Sign inSign up

johnneerdael/bind9-qa

By johnneerdael

•Updated about 1 year ago

Bind9 QA Build for DNS Testing

Developer tools
0

36

johnneerdael/bind9-qa repository overview

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.

  1. Pulling the Image Before running, pull the image from your repository:

docker pull johnneerdael/bind9-custom:latest

  1. Running with Docker CLI (docker run) To run the container using the Docker CLI, we recommend mapping container port 53 to an unprivileged, non-standard port on your host machine (e.g., 30053) to avoid conflicts and potential permission issues.

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`

Tag Summary

No tags have been pushed to this repository yet.