#! /bin/bash # This is not normally how this container is launched. Instead, see # named.container, which allows podman-systemd to construct a systemd # unit files and run using podman. # # Instead, this script can be used to launch the container "by hand". BASE_CONF_DIR=/etc/bind CMD="-f -c /etc/bind/named.conf" [ "$1" = "interactive" ] && ARGS="-ti --entrypoint=/bin/sh" && CMD="" [ -x /usr/bin/docker ] && DOCKER=/usr/bin/docker [ -x /usr/bin/podman ] && DOCKER=/usr/bin/podman # Note that as of 2024-09-01, this image is based on Alpine linux and its entrypoint is: # '/usr/sbin/named -u bind' # and the default command is: # '-f -c /etc/bind/named.conf -L /var/log/bind/default.log' # shellcheck disable=SC2086 $DOCKER run $ARGS \ --rm \ --name=bind9 \ --network=host \ -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"