/docker-bind

Dockerize BIND DNS server

Primary LanguageShellMIT LicenseMIT

DEPRECATED

This image is deprecated and not supported anymore. Consider using sameersbn/bind (Github) instead.

Circle CI

aivus/bind:9.11.5-20200515

Introduction

Dockerfile to create a Docker container image for BIND DNS server.

BIND is open source software that implements the Domain Name System (DNS) protocols for the Internet. It is a reference implementation of those protocols, but it is also production-grade software, suitable for use in high-volume and high-reliability applications.

Contributing

If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.

Issues

Before reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.

SELinux users should try disabling SELinux using the command setenforce 0 to see if it resolves the issue.

If the above recommendations do not help then report your issue along with the following information:

  • Output of the docker version and docker info commands
  • The docker run command or docker-compose.yml used to start the image. Mask out the sensitive bits.
  • Please state if you are using Boot2Docker, VirtualBox, etc.

Getting started

Installation

Automated builds of the image are available on Dockerhub and is the recommended method of installation.

docker pull aivus/bind:9.11.5-20200515

Alternatively you can build the image yourself.

docker build -t aivus/bind github.com/aivus/docker-bind

Quickstart

Start BIND using:

docker run --name bind -d --restart=always \
  --publish 53:53/tcp --publish 53:53/udp \
  --volume /srv/docker/bind:/data \
  aivus/bind:9.11.5-20200515

Alternatively, you can use the sample docker-compose.yml file to start the container using Docker Compose

Command-line arguments

You can customize the launch command of BIND server by specifying arguments to named on the docker run command. For example the following command prints the help menu of named command:

docker run --name bind -it --rm \
  --publish 53:53/tcp --publish 53:53/udp \
  --volume /srv/docker/bind:/data \
  aivus/bind:9.11.5-20200515 -h

Persistence

For the BIND to preserve its state across container shutdown and startup you should mount a volume at /data.

The Quickstart command already mounts a volume for persistence.

SELinux users should update the security context of the host mountpoint so that it plays nicely with Docker:

mkdir -p /srv/docker/bind
chcon -Rt svirt_sandbox_file_t /srv/docker/bind

Maintenance

Upgrading

To upgrade to newer releases:

  1. Download the updated Docker image:
docker pull aivus/bind:9.11.5-20200515
  1. Stop the currently running image:
docker stop bind
  1. Remove the stopped container
docker rm -v bind
  1. Start the updated image
docker run --name bind -d \
  [OPTIONS] \
  aivus/bind:9.11.5-20200515

Shell Access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it bind bash