Public Repository

Last pushed: a year ago
Short Description
powerdns 3.4.8
Full Description

Github: https://github.com/jgreat/docker-powerdns

PowerDNS build based on image from "exira/docker-powerdns"
Fixed some issues with the entrypoint script.

After installing you will need to add your zone via API call.

curl -s -X POST \
  -H 'X-API-Key: <webserver_password>' \
  -H 'Accept: application/json' \
  https://powerdns.example.com:8100/servers/localhost/zones \
  --data '{"name": "<domain_name>", "kind": "Native", "masters": [], "nameservers": ["ns1.<domain_name>."]}'

Rancher Catalog

docker-compose.yml

mysql:
  image: mysql:5.7.12
  expose:
    - 3306
  volumes-from:
    - mysql-data-volume
  environment:
    MYSQL_ROOT_PASSWORD: ${mysql_root_password}
    MYSQL_DATABASE: ${mysql_database}
    MYSQL_USER: ${mysql_user}
    MYSQL_PASSWORD: ${mysql_password}
  labels:
    io.rancher.container.hostname_override: container_name
    io.rancher.container.pull_image: always
    io.rancher.sidekicks: mysql-data-volume

mysql-data-volume:
  image: busybox
  net: none
  command: /bin/true
  labels:
    io.rancher.container.start_once: 'true'
  volumes:
    - /var/lib/mysql

powerdns-server:
  image: jgreat/powerdns:latest
  ports:
    - 53:5300/tcp
    - 53:5300/udp
  expose:
    - 8000/tcp
  environment:
    MYSQL_HOST: mysql
    MYSQL_PORT: '3306'
    MYSQL_DATABASE: ${mysql_database}
    MYSQL_USER: ${mysql_user}
    MYSQL_PASSWORD: ${mysql_password}
    WEBSERVER: 'true'
    WEBSERVER_PASSWORD: ${webserver_password}
    PDNS_SOA_NAME: ns1.${domain_name}
    PDNS_SOA_MAIL: ${email}
    MODE_MASTER: 'true'
  labels:
    io.rancher.container.hostname_override: container_name
    io.rancher.container.pull_image: always
  links:
    - mysql:mysql

powerdns:
  image: rancher/load-balancer-service
  ports:
    - 8100:8000
  links:
    - powerdns-server:powerdns-server
  labels:
    io.rancher.loadbalancer.ssl.ports: '8100'
    io.rancher.container.hostname_override: container_name

rancher-composer.yml

.catalog:
  name: PowerDNS
  version: 3.4.8-1
  description: PowerDNS server with MYSQL backend
  uuid: powerdns-3.4.8-1
  questions:
    - variable: mysql_database
      label: MySQL Database
      type: string
      required: true
      default: pdns
    - variable: mysql_user
      label: MySQL Database User
      type: string
      required: true
      default: pdns
    - variable: mysql_password
      label: MySQL Database Password
      type: password
      required: true
    - variable: mysql_root_password
      label: MySQL Root Password
      type: password
      required: true
    - variable: domain_name
      label: Base Domain
      description: The base domain i.e. moo.example.com
      type: string
      required: true
    - variable: email
      label: SOA Email Address
      description: Email address listed in the SOA record
      type: string
      required: true
    - variable: webserver_password
      label: API Key
      description: PowerDNS API Access Key
      type: password
      required: true
    - variable: cert_name
      label: SSL Cert Name
      description: SSL Cert Regestered in Rancher
      type: certificate
      required: true

powerdns-server:
  scale: 1
  health_check:
    port: 8000
    interval: 10000
    unhealthy_threshold: 2
    request_line: ''
    strategy: none
    healthy_threshold: 2
    response_timeout: 1000

mysql:
  scale: 1
  health_check:
    port: 3306
    interval: 10000
    unhealthy_threshold: 2
    request_line: ''
    strategy: none
    healthy_threshold: 2
    response_timeout: 1000

powerdns:
  scale: 1
  load_balancer_config:
    haproxy_config: {}
  default_cert: "${cert_name}"
  health_check:
    port: 42
    interval: 10000
    unhealthy_threshold: 3
    healthy_threshold: 2
    response_timeout: 10000
Docker Pull Command
Owner
jgreat