Browse Source

Added option to enable the experimental API

3.4.1
Fábio Kaiser Rauber 9 years ago
parent
commit
a8195fbeb3
  1. 6
      pdns/Dockerfile
  2. 16
      pdns/start.sh

6
pdns/Dockerfile

@ -1,10 +1,12 @@
FROM debian:jessie FROM debian:jessie
MAINTAINER Fabio Rauber <fabiorauber@gmail.com> MAINTAINER Fabio Rauber <fabiorauber@gmail.com>
ENV DEBIAN_FRONTEND="noninteractive" ENV DNSSEC="yes" \
APIKEY=""
RUN apt-get update && \ RUN apt-get update && \
apt-get install -q -y pdns-server pdns-backend-mysql mysql-client && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y pdns-server pdns-backend-mysql mysql-client && \
rm /etc/powerdns/pdns.d/*.conf && rm /etc/powerdns/*.conf && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 53/udp 53/tcp EXPOSE 53/udp 53/tcp

16
pdns/start.sh

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
mkdir -p /etc/powerdns mkdir -p /etc/powerdns/pdns.d
cat >/etc/powerdns/pdns.conf <<EOF cat >/etc/powerdns/pdns.conf <<EOF
# MySQL Configuration # MySQL Configuration
@ -12,9 +12,21 @@ gmysql-host=mysql
gmysql-user=$MYSQL_ENV_MYSQL_USER gmysql-user=$MYSQL_ENV_MYSQL_USER
gmysql-dbname=$MYSQL_ENV_MYSQL_DATABASE gmysql-dbname=$MYSQL_ENV_MYSQL_DATABASE
gmysql-password=$MYSQL_ENV_MYSQL_PASSWORD gmysql-password=$MYSQL_ENV_MYSQL_PASSWORD
gmysql-dnssec=yes gmysql-dnssec=$DNSSEC
include-dir=/etc/powerdns/pdns.d
EOF EOF
if [ ! -z $APIKEY ]; then
cat >/etc/powerdns/pdns.d/api.conf <<EOF
experimental-json-interface=yes
webserver=yes
webserver-address=0.0.0.0
webserver-allow-from=0.0.0.0/0
experimental-api-key=$APIKEY
EOF
fi
mysqlcheck() { mysqlcheck() {
# Wait for MySQL to be available... # Wait for MySQL to be available...
COUNTER=20 COUNTER=20

Loading…
Cancel
Save