Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Multi-architecture Docker images for PowerDNS Authoritative Server

License

Notifications You must be signed in to change notification settings

mabels/pdns-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

PowerDNS Docker Images

Multi-architecture Docker images for PowerDNS Authoritative Server with PostgreSQL, MySQL, SQLite3, and BIND backends.

Supported Architectures

  • linux/amd64 (x86_64)
  • linux/arm64 (aarch64)

Features

  • PowerDNS Authoritative Server 4.9 from official PowerDNS repositories
  • Multiple backends included:
    • PostgreSQL (pdns-backend-pgsql)
    • MySQL/MariaDB (pdns-backend-mysql)
    • SQLite3 (pdns-backend-sqlite3)
    • BIND zone files (pdns-backend-bind)
  • PowerDNS tools (pdns_control, pdnsutil, etc.)
  • Health checks built-in
  • Minimal base image (Debian Bookworm Slim)
  • Official packages from repo.powerdns.com

Usage

Pull from GitHub Container Registry

docker pull ghcr.io/mabels/pdns-docker:latest

Run with PostgreSQL Backend

docker run -d \
 --name powerdns \
 -p 53:53/tcp \
 -p 53:53/udp \
 -e PDNS_gpgsql_host=postgres \
 -e PDNS_gpgsql_port=5432 \
 -e PDNS_gpgsql_dbname=powerdns \
 -e PDNS_gpgsql_user=powerdns \
 -e PDNS_gpgsql_password=secret \
 -e PDNS_launch=gpgsql \
 -e PDNS_api=yes \
 -e PDNS_api_key=changeme \
 -e PDNS_webserver=yes \
 -e PDNS_webserver_address=0.0.0.0 \
 -e PDNS_webserver_port=8081 \
 ghcr.io/mabels/pdns-docker:latest

Run with SQLite3 Backend (Testing)

docker run -d \
 --name powerdns \
 -p 53:53/tcp \
 -p 53:53/udp \
 -v $(pwd)/pdns.db:/var/lib/powerdns/pdns.db \
 -e PDNS_launch=gsqlite3 \
 -e PDNS_gsqlite3_database=/var/lib/powerdns/pdns.db \
 ghcr.io/mabels/pdns-docker:latest

Run with BIND Zone Files

docker run -d \
 --name powerdns \
 -p 53:53/tcp \
 -p 53:53/udp \
 -v $(pwd)/zones:/etc/powerdns/zones \
 -e PDNS_launch=bind \
 -e PDNS_bind_config=/etc/powerdns/named.conf \
 ghcr.io/mabels/pdns-docker:latest

Configuration

PowerDNS configuration can be provided via:

  1. Environment variables - Prefix with PDNS_

    • Example: PDNS_launch=gpgsql sets launch=gpgsql
    • Example: PDNS_gpgsql_host=postgres sets gpgsql-host=postgres
  2. Configuration file - Mount to /etc/powerdns/pdns.conf

    • Example: -v $(pwd)/pdns.conf:/etc/powerdns/pdns.conf
  3. Configuration directory - Place files in /etc/powerdns/pdns.d/

    • Files are loaded automatically

Database Schema

Initialize PostgreSQL database:

# Create database and user
psql -U postgres -c "CREATE DATABASE powerdns;"
psql -U postgres -c "CREATE USER powerdns WITH PASSWORD 'secret';"
psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE powerdns TO powerdns;"
# Import schema
docker run --rm -i ghcr.io/mabels/pdns-docker:latest \
 cat /usr/share/doc/pdns-backend-pgsql/schema.pgsql.sql | \
 psql -U powerdns -h postgres powerdns

Health Check

The image includes a health check that pings PowerDNS every 30 seconds:

docker inspect --format='{{.State.Health.Status}}' powerdns

Building Locally

docker buildx build \
 --platform linux/amd64,linux/arm64 \
 --build-arg PDNS_VERSION=49 \
 -t pdns-docker:local \
 .

License

This Dockerfile and documentation are provided under the Apache License 2.0.

PowerDNS itself is licensed under the GNU GPL v2. See PowerDNS License.

Links

About

Multi-architecture Docker images for PowerDNS Authoritative Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

AltStyle によって変換されたページ (->オリジナル) /