Public | Automated Build

Last pushed: 23 days ago
Short Description
BIND server running on Alpine Linux
Full Description


BIND server running on Alpine Linux:latest.


Create a data directory on the host system for store configs, zone data, pid file...:

mkdir -p /var/ct/bind/etc/bind /var/ct/bind/var/bind /var/ct/bind/var/run/named

Copy config files:

tar xvf bind.tgz -C /var/ct/bind/etc/

Run BIND server:

docker run -d --log-driver=syslog --log-opt tag="{{.Name}}/{{.ID}}" --restart=always --name bind --read-only=true \
-v /var/ct/bind/etc/bind:/etc/bind -v /var/ct/bind/var/bind:/var/bind \
-v /var/ct/bind/var/run/named:/var/run/named --cpuset-cpus="0-1" \
--memory="256m" --kernel-memory="128m" --memory-swap="512m" -p 53:53/udp \
-p 53:53/tcp --security-opt no-new-privileges 2infinity/bind:latest

Set permissions:

docker exec bind chown -R root:named /var/bind /var/run/named
docker exec bind chmod -R 770 /var/bind /var/run/named

Make key for rndc:

docker exec bind rndc-confgen -a 
docker exec bind chown named /etc/bind/rndc.key
vi named.conf.local and remove comments after //run rndc-confgen...

Restart container:

docker restart bind
Docker Pull Command
Source Repository