Add README.md, unit file

This commit is contained in:
2023-02-25 19:30:43 -05:00
parent 511ad88635
commit ebbf15d452
4 changed files with 86 additions and 4 deletions

22
run_bind_container.sh Executable file
View File

@@ -0,0 +1,22 @@
#! /bin/bash
#BASE_CONF_DIR=/etc/bind
BASE_CONF_DIR=/home/davidb/src/docker_bind
: "${DNS_PORT:=55}" # non-production default
: "${RNDC_PORT:=955}" # non-produciton default
CMD="/etc/bind/run.sh"
[ "$1" = "interactive" ] && ARGS="-ti --entrypoint=/bin/bash" && CMD=""
# shellcheck disable=SC2086
docker run $ARGS \
--rm \
--name=bind9 \
--add-host=host.docker.internal:host-gateway \
--publish "$RNDC_PORT:953/tcp" \
--publish "$DNS_PORT:53/udp" \
--publish "$DNS_PORT:53/tcp" \
-v $BASE_CONF_DIR/cfg:/etc/bind \
-v $BASE_CONF_DIR/cache:/var/cache/bind \
-v $BASE_CONF_DIR/zones:/var/lib/bind \
-v $BASE_CONF_DIR/log:/var/log \
docker.io/internetsystemsconsortium/bind9:9.18 $CMD