Sign inSign up

drcoccodrillus/bind9

By drcoccodrillus

•Updated over 3 years ago

Image
0

221

drcoccodrillus/bind9 repository overview

⁠drcoccodrillus/bind9

A dockerized and customizable DNS Server based on bind9⁠


⁠General description

This Docker image is based on the ubuntu/bind9⁠ image maintained by Canonical.

⁠Default configuration

Every Docker container created from this image has the following standard network configuration:

Name ServerA Record
ns1.bushido.local172.100.0.2
host1.bushido.local172.100.0.3
host2.bushido.local172.100.0.4
DNS Forwarder
8.8.8.8
8.8.4.4

If you need to change the DNS Server configuration you need to jump into the container and edit the following files:

  • /etc/bind/zones/db.bushido.local
  • /etc/bind/named.conf.local
  • /etc/bind/named.conf.local

Or even better you should write a Dockerfile similar to the one below so you can copy new configuration files into it:

FROM drcoccodrillus/bind9:latest

COPY named.conf.options /etc/bind/
COPY named.conf.local /etc/bind/
COPY db.bushido.local /etc/bind/zones/

⁠How to use it

Using this dockerized version of Bind9 is pretty simple. Just follow the steps below in order to make it working on your system.

⁠Start bind9 contatiner

docker run -d --name=dns-server --net=bushido-network --ip=172.100.0.2 drcoccodrillus/bind9

⁠Start two host test containers

docker run -d --rm --name=host1 --net=bushido-network --ip=172.100.0.3 --dns=172.100.0.2 ubuntu:22.04 /bin/bash -c "while :; do sleep 10; done"

docker run -d --rm --name=host2 --net=bushido-network --ip=172.100.0.4 --dns=172.100.0.2 ubuntu:22.04 /bin/bash -c "while :; do sleep 10; done"

⁠Jump into container host1

docker exec -it host1 /bin/bash

⁠From host1 try to ping host2

ping 172.100.0.4

Tag summary

Content type

Image

Digest

sha256:41e57fcc3…

Size

71.8 MB

Last updated

over 3 years ago

docker pull drcoccodrillus/bind9