Browse Source

Changed prefix of environemnt variables to PDNSCONF, to avoid conflicts

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

16
pdns/Dockerfile

@ -1,14 +1,14 @@
FROM debian:jessie-backports
MAINTAINER Fabio Rauber <fabiorauber@gmail.com>
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=""
ENV PDNSCONF_LAUNCH="gmysql" \
PDNSCONF_GMYSQL_HOST="mysql" \
PDNSCONF_GMYSQL_USER='$MYSQL_ENV_MYSQL_USER' \
PDNSCONF_GMYSQL_DBNAME='$MYSQL_ENV_MYSQL_DATABASE' \
PDNSCONF_GMYSQL_PASSWORD='$MYSQL_ENV_MYSQL_PASSWORD' \
PDNSCONF_INCLUDE_DIR="/etc/powerdns/pdns.d" \
PDNSCONF_GMYSQL_DNSSEC="yes" \
PDNSCONF_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 && \

6
pdns/start.sh

@ -2,11 +2,11 @@
mkdir -p /etc/powerdns/pdns.d
PDNSVARS=`echo ${!PDNS_*}`
PDNSVARS=`echo ${!PDNSCONF_*}`
touch /etc/powerdns/pdns.conf
for var in $PDNSVARS; do
varname=`echo ${var#"PDNS_"} | awk '{print tolower($0)}' | sed 's/_/-/g'`
varname=`echo ${var#"PDNSCONF_"} | awk '{print tolower($0)}' | sed 's/_/-/g'`
value=`echo ${!var} | sed 's/^$\(.*\)/\1/'`
if [ ! -z ${!value} ]; then
echo "$varname=${!value}" >> /etc/powerdns/pdns.conf
@ -15,7 +15,7 @@ for var in $PDNSVARS; do
fi
done
if [ ! -z $PDNS_EXPERIMENTAL_API_KEY ]; then
if [ ! -z $PDNSCONF_EXPERIMENTAL_API_KEY ]; then
cat >/etc/powerdns/pdns.d/api.conf <<EOF
experimental-json-interface=yes
webserver=yes

Loading…
Cancel
Save