From 77202109ea954ccedcc7923885dfbc86ba0bca03 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Fri, 24 Jun 2016 14:15:21 -0300 Subject: [PATCH] Reconfigured init script to support any PowerDNS configuration parameter --- pdns/Dockerfile | 10 ++++++++-- pdns/start.sh | 28 +++++++++++++--------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/pdns/Dockerfile b/pdns/Dockerfile index 94f98ad..b8920bf 100644 --- a/pdns/Dockerfile +++ b/pdns/Dockerfile @@ -1,8 +1,14 @@ FROM debian:jessie-backports MAINTAINER Fabio Rauber -ENV DNSSEC="yes" \ - APIKEY="" +ENV PDNS_LAUNCH="gmysql" \ + PDNS_GMYSQL_HOST="mysql" \ + PDNS_GMYSQL_USER='$MYSQL_ENV_MYSQL_USER' \ + PDNS_GMYSQL_DBNAME='$MYSQL_ENV_MYSQL_DATABASE' \ + PDNS_GMYSQL_PASSWORD='$MYSQL_ENV_MYSQL_PASSWORD' \ + PDNS_INCLUDE_DIR="/etc/powerdns/pdns.d" \ + PDNS_GMYSQL_DNSSEC="yes" \ + PDNS_EXPERIMENTAL_API_KEY="" RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y -t jessie-backports pdns-server pdns-backend-mysql mysql-client && \ diff --git a/pdns/start.sh b/pdns/start.sh index 34126e0..2b0e18a 100644 --- a/pdns/start.sh +++ b/pdns/start.sh @@ -2,27 +2,25 @@ mkdir -p /etc/powerdns/pdns.d -cat >/etc/powerdns/pdns.conf <> /etc/powerdns/pdns.conf + else + echo "$varname=$value" >> /etc/powerdns/pdns.conf + fi +done -if [ ! -z $APIKEY ]; then +if [ ! -z $PDNS_EXPERIMENTAL_API_KEY ]; then cat >/etc/powerdns/pdns.d/api.conf <