1. Images & Charts
  2. bind9
bind9

bind9

Networking
Updated 9 hours ago

BIND 9 Overview

Secure your stack with a hardened BIND 9 image freshly-built by Minimus. Minimus images always include the most up-to-date package version for all packages and dependencies contained in the image.


BIND 9 is the most widely deployed DNS server software on the internet, serving as an authoritative name server, a recursive resolver, or both. Its daemon process is called named (short for "name daemon").


Try It Out

Prerequisites

  • Docker and Docker Compose installed and running
  • dig available on your host (optional, for testing resolution)

Step 1: Create the Project Directory

mkdir bind9 && cd bind9
mkdir -p config zones cache log

Step 2: Create docker-compose.yml

cat <<'EOF' > docker-compose.yml
services:
  bind9:
    image: reg.mini.dev/bind9
    container_name: bind9-test
    restart: "no"
    ports:
      - "5353:53/udp"
      - "5353:53/tcp"
      - "127.0.0.1:9953:953/tcp"
    volumes:
      - ./config:/etc/bind:ro
      - ./zones:/var/lib/bind:ro
      - ./cache:/var/cache/bind
      - ./log:/var/log/bind
    healthcheck:
      test: ["CMD", "/usr/bin/dig", "@127.0.0.1", "example.test", "SOA", "+short"]
      interval: 10s
      timeout: 5s
      retries: 6
      start_period: 15s
    cap_add:
      - NET_BIND_SERVICE
EOF

Step 3: Create config/named.conf

cat <<'EOF' > config/named.conf
options {
    directory "/var/cache/bind";
    recursion yes;
    allow-query { any; };
    forwarders { 1.1.1.1; 8.8.8.8; };
    forward first;
    dnssec-validation no;
    version "hidden";
    listen-on { any; };
    listen-on-v6 { any; };
};

zone "example.test" {
    type primary;
    file "/var/lib/bind/db.example.test";
};
EOF

Step 4: Create zones/db.example.test

cat <<'EOF' > zones/db.example.test
$TTL 86400
@   IN  SOA  ns1.example.test. admin.example.test. (
             2024010101  ; serial
             3600        ; refresh
             900         ; retry
             604800      ; expire
             86400 )     ; minimum

@       IN  NS      ns1.example.test.
@       IN  MX  10  mail.example.test.
@       IN  TXT     "v=spf1 mx ~all"
@       IN  A       10.0.0.1

ns1     IN  A       10.0.0.1
mail    IN  A       10.0.0.10
www     IN  A       10.0.0.20
www     IN  AAAA    2001:db8::20
alias   IN  CNAME   www.example.test.
EOF

Step 5: Set Permissions and Start

chmod 777 cache/ log/
chmod 755 config/ zones/
chmod 644 config/named.conf zones/db.example.test
docker compose up -d

Check the logs (named writes to a file, not stdout):

cat log/default.log

Query the local zone to confirm it answers:

dig @127.0.0.1 -p 5353 example.test SOA

Step 6: Clean Up

docker compose down

Technical Considerations

The BIND 9 image provided by Minimus is a slim, security-hardened alternative to the public image. The images are largely interchangeable, with a few differences as noted below.

BIND 9 built by Minimus:

  1. Runs as root to support required functions in alignment with the public image.
  2. Ships without a shell or package manager, removing common post-exploitation tooling.
  3. Drill down on the version specification tab to see the default user, listening ports, entrypoint, volumes, environment variables, etc.

The Payoff

A hardened, minimal image that will remain more secure for the long run and accrue vulnerabilities at a slower rate.


Terms & Info

Trademark

This catalog is published by Minimus. All product names, logos, and marks, other than those belonging to Minimus, shown are owned by their respective rights holders and appear here only to identify the open source software each image contains. Minimus claims no ownership of those marks and implies no affiliation with, endorsement by, certification by, or sponsorship by any rights holder.

Disclaimer

Images are provided "as-is" without warranty of any kind. "Hardened" refers to the security configuration applied at the time of build and does not constitute a guarantee of ongoing security or absence of vulnerabilities. The free tier is provided without support, SLA, or guaranteed patching timelines. Security updates may be applied to paid subscriptions before or instead of free tier images. By pulling or using any image you agree to our Terms of Use.