No description
  • Shell 89.1%
  • Dockerfile 10.9%
Find a file
Mathieu Fruchet 04eb04e42b Add README
2026-01-26 13:17:22 +01:00
sources Version 1.0 2026-01-26 12:34:25 +01:00
static Add README 2026-01-26 13:17:22 +01:00
tests Version 1.0 2026-01-26 12:34:25 +01:00
.gitignore Version 1.0 2026-01-26 12:34:25 +01:00
Dockerfile Version 1.0 2026-01-26 12:34:25 +01:00
entrypoint.sh Version 1.0 2026-01-26 12:34:25 +01:00
healthcheck.sh Version 1.0 2026-01-26 12:34:25 +01:00
README.md Add README 2026-01-26 13:17:22 +01:00

PowerDNS Authoritative Server - Docker Image

Version Button: GPL v3 Static Badge

Image Docker personnalisée pour PowerDNS Authoritative Server avec support complet de SQLite3, MySQL/MariaDB et PostgreSQL.

Quick Start

SQLite3

docker run -d \
  --name powerdns \
  -p 53:53/udp \
  -p 53:53/tcp \
  -p 8081:8081/tcp \
  -e PDNS_LAUNCH=gsqlite3 \
  -e PDNS_API=yes \
  -e PDNS_API_KEY=your-secret-key \
  -e PDNS_WEBSERVER=yes \
  -e PDNS_WEBSERVER_ADDRESS=0.0.0.0 \
  -e PDNS_WEBSERVER_ALLOW_FROM=0.0.0.0/0 \
  -v ./data:/data \
  forge.hutit.fr/docker/pdns:latest

MySQL/MariaDB

docker run -d \
  --name powerdns \
  -p 53:53/udp \
  -p 53:53/tcp \
  -p 8081:8081/tcp \
  -e PDNS_LAUNCH=gmysql \
  -e PDNS_GMYSQL_HOST=your-mysql-host \
  -e PDNS_GMYSQL_USER=powerdns \
  -e PDNS_GMYSQL_PASSWORD=your-password \
  -e PDNS_GMYSQL_DBNAME=powerdns \
  -e PDNS_GMYSQL_INIT_SCHEMA=true \
  -e PDNS_API=yes \
  -e PDNS_API_KEY=your-secret-key \
  -e PDNS_WEBSERVER=yes \
  -e PDNS_WEBSERVER_ADDRESS=0.0.0.0 \
  -e PDNS_WEBSERVER_ALLOW_FROM=0.0.0.0/0 \
  forge.hutit.fr/docker/pdns:latest

PostgreSQL

docker run -d \
  --name powerdns \
  -p 53:53/udp \
  -p 53:53/tcp \
  -p 8081:8081/tcp \
  -e PDNS_LAUNCH=gpgsql \
  -e PDNS_GPGSQL_HOST=your-postgres-host \
  -e PDNS_GPGSQL_USER=powerdns \
  -e PDNS_GPGSQL_PASSWORD=your-password \
  -e PDNS_GPGSQL_DBNAME=powerdns \
  -e PDNS_GPGSQL_INIT_SCHEMA=true \
  -e PDNS_API=yes \
  -e PDNS_API_KEY=your-secret-key \
  -e PDNS_WEBSERVER=yes \
  -e PDNS_WEBSERVER_ADDRESS=0.0.0.0 \
  -e PDNS_WEBSERVER_ALLOW_FROM=0.0.0.0/0 \
  forge.hutit.fr/docker/pdns:latest

Configuration

Principe

Toutes les options PowerDNS sont supportées via des variables d'environnement préfixé par PDNS_.

Conversion automatique :

  • PDNS_API_KEY--api-key=value
  • PDNS_WEBSERVER_ADDRESS--webserver-address=value
  • PDNS_LOCAL_PORT--local-port=value

Les underscores (_) sont convertis en tirets (-) et tout est mis en minuscules.

Documentation complète : PowerDNS Settings

Initialisation des backends

Chaque backend possède une variable permettant l'initialisation de ce dernier.

  • PDNS_GSQLITE3_INIT_SCHEMA=true initialise automatiquement le schéma SQLite3
  • PDNS_GMYSQL_INIT_SCHEMA=true : initialise automatiquement le schéma MySQL
  • PDNS_GPGSQL_INIT_SCHEMA=true : initialise automatiquement le schéma PostgreSQL

Build

git clone https://forge.hutit.fr/docker/pdns.git
cd pdns
docker build -t powerdns-auth:latest .

Tests

cd tests

# SQLite3
docker compose -f docker-compose.sqlite3.yml up

# MariaDB
docker compose -f docker-compose.mariadb.yml up

# PostgreSQL
docker compose -f docker-compose.pgsql.yml up

Logs

docker logs powerdns
docker logs -f powerdns  # Suivre en temps réel

Support

Licence

Cette image est sous licence GPLv3-or-later.

PowerDNS est sous licence GPLv2 : https://www.powerdns.com/