BIND9 in a Docker container, with configuration and zone files in a volume, and a configurable UID/GID for the BIND process.
Pull the latest image from Docker Hub:
docker pull wastrachan/bind
Or, pull from the GitHub Container Registry:
docker pull ghcr.io/wastrachan/bind
Clone this repository, and run make build
to build an image:
git clone https://github.com/wastrachan/docker-bind.git
cd docker-bind
make build
Run this image with the make run
shortcut, or manually with docker run
.
docker run -v "$(pwd)/config:/config" \
--name bind \
--rm \
-p 53:53/udp \
-e PUID=$(id -u) \
-e PGID=$(id -g) \
wastrachan/bind:latest
Configuration files are stored in the /config
volume. You may wish to mount this volume as a local directory, as shown in the examples above. /config/named.conf
is the main configuration file for the application. Review the BIND man pages if you are unfamiliar with how to configure BIND.
If you'd like to override the UID and GID of the named
process, you can do so with the environment variables PUID
and PGID
. This is helpful if other containers must access your configuration volume.
Service | Port |
---|---|
DNS | 53 |
Volume | Description |
---|---|
/config |
Configuration directory for BIND config and zone files. |
The content of this project itself is licensed under the MIT License.
View license information for the software contained in this image.