Public | Automated Build

Last pushed: 3 months ago
Short Description
POWERDNS
Full Description

PowerDNS Docker Container




  • Small Alpine based Image
  • MySQL (default), Postgres, SQLite and Bind backend included
  • Automatic database initialization for MySQL, Postgres or SQLite
  • Latest PowerDNS version (if not pls file an issue)
  • Guardian process enabled
  • Graceful shutdown using pdns_control

Supported tags

  • Exact: i.e. 4.0.2-r3: PowerDNS Version 4.0.2, image build 3
  • 4.0: PowerDNS Version 4.0.x, latest image build
  • 4: PowerDNS Version 4.x.x, latest image build

Usage

MySQL

# Start a MySQL Container
$ docker run -d \
  --name pdns-mysql \
  -e MYSQL_ROOT_PASSWORD=supersecret \
  -v $PWD/mysql-data:/var/lib/mysql \
  mariadb:10.1

$ docker run --name pdns \
  --link pdns-mysql:mysql \
  -p 53:53 \
  -p 53:53/udp \
  -e MYSQL_USER=root \
  -e MYSQL_PASS=supersecret \
  psitrax/powerdns \
    --cache-ttl=120 \
    --allow-axfr-ips=127.0.0.1 123.1.2.3

Postgres

# Start a MySQL Container
$ docker run -d \
  --name pdns-postgres \
  -e POSTGRES_PASSWORD=supersecret \
  -v $PWD/postgres-data:/var/lib/postgresql \
  postgres:9.6

$ docker run --name pdns \
  --link pdns-postgres:postgres \
  -p 53:53 \
  -p 53:53/udp \
  -e AUTOCONF=postgres \
  -e PGSQL_USER=postgres \
  -e PGSQL_PASS=supersecret \
  psitrax/powerdns \
    --cache-ttl=120 \
    --allow-axfr-ips=127.0.0.1 123.1.2.3

SQLite

$ docker run --name pdns \
  -p 53:53 \
  -p 53:53/udp \
  -e AUTOCONF=sqlite \
  psitrax/powerdns \
    --cache-ttl=120 \
    --allow-axfr-ips=127.0.0.1 123.1.2.3

Configuration

Environment Configuration:

  • MySQL connection settings
    • MYSQL_HOST=mysql
    • MYSQL_USER=root
    • MYSQL_PASS=root
    • MYSQL_DB=pdns
  • Postgres connection settings
    • PGSQL_HOST=mysql
    • PGSQL_USER=root
    • PGSQL_PASS=root
    • PGSQL_DB=pdns
  • SQLite connection settings
    • SQLITE_DB=/pdns.sqlite3
  • Want to disable mysql initialization? Use AUTOCONF=false
  • Want to apply 12Factor-Pattern? Apply environment variables of the form PDNS_$pdns-config-variable=$config-value, like PDNS_WEBSERVER=yes
  • Want to use own config files? Mount a Volume to /etc/pdns/conf.d or simply overwrite /etc/pdns/pdns.conf

PowerDNS Configuration:

Append the PowerDNS setting to the command as shown in the example above.
See docker run --rm psitrax/powerdns --help

Maintainer

Docker Pull Command
Owner
cloudesire
Source Repository

Comments (0)