Bind9 QA Build for DNS Testing
36
BIND9 Custom DNS Server This image contains a pre-configured BIND9 (named) DNS server based on the ubuntu/bind9 base image. All essential configuration files (named.conf.options, named.conf.local, and zone files under zones/) are baked directly into the image at build time for portability.
docker pull johnneerdael/bind9-custom:latest
The container is configured to run in the Europe/Amsterdam timezone.
--name bind9 \
-p 53:53/udp \
-p 53:53/tcp \
-e TZ=Europe/Amsterdam \
-e BIND9_USER=bind \
--restart always \
johnneerdael/bind9-custom:latest```
Testing:
Once running, you can test DNS resolution using dig (or nslookup) pointing to your host machine's IP address and the mapped port:
# Example query for ad.test on host port 30053
dig @127.0.0.1 -p 30053 ad.test
3. Running with Docker Compose
For persistent deployment, use Docker Compose. Since the configuration is built into the image, the Compose file is cleaner, only focusing on ports and environment variables.
File: docker-compose.yml
```services:
bind9:
image: johnneerdael/bind9-custom:latest
container_name: bind9
# Environment variables baked into the Dockerfile but confirmed here
environment:
- TZ=Europe/Amsterdam
- BIND9_USER=bind
# Map the host port 53 to the container's internal port 53
ports:
- "53:53/udp"
- "53:53/tcp"
# If systemd-resolved causes issues change the ip below to the real ip and it will boot
# ports:
# - "127.0.0.1:53:53/udp"
# - "127.0.0.1:53:53/tcp"
restart: always```
Command to Start:
`docker compose up -d`
No tags have been pushed to this repository yet.