adjust run script

This commit is contained in:
David Blacka 2023-02-25 14:51:25 -05:00
parent 6092f80cb2
commit 931b2c6592

View File

@ -3,7 +3,8 @@
BASE_CONF_DIR=/etc/bind BASE_CONF_DIR=/etc/bind
: "${DNS_PORT:=53}" : "${DNS_PORT:=53}"
: "${RNDC_PORT:=953}" : "${RNDC_PORT:=953}"
[ "$1" = "interactive" ] && ARGS="-ti --entrypoint=/bin/bash" CMD="/usr/sbin/named -c /etc/bind/named.conf -4 -f"
[ "$1" = "interactive" ] && ARGS="-ti --entrypoint=/bin/bash" && CMD=""
# shellcheck disable=SC2086 # shellcheck disable=SC2086
docker run $ARGS \ docker run $ARGS \
@ -17,5 +18,4 @@ docker run $ARGS \
-v $BASE_CONF_DIR/cache:/var/cache/bind \ -v $BASE_CONF_DIR/cache:/var/cache/bind \
-v $BASE_CONF_DIR/zones:/var/lib/bind \ -v $BASE_CONF_DIR/zones:/var/lib/bind \
-v $BASE_CONF_DIR/log:/var/log \ -v $BASE_CONF_DIR/log:/var/log \
docker.io/internetsystemsconsortium/bind9:9.18 \ docker.io/internetsystemsconsortium/bind9:9.18 $CMD
/usr/sbin/named -c /etc/bind/named.conf -4 -f