Commit cc401f4e authored by kaiyou's avatar kaiyou
Browse files

Handle dynamic pdns_server arguments

parent a33ca963
......@@ -6,13 +6,8 @@ RUN apt-get update \
ADD ./start.sh /start.sh
ENV PDNS_MYSQL_HOST=db
ENV PDNS_MYSQL_DB=
ENV PDNS_MYSQL_USER=
ENV PDNS_MYSQL_PASSWORD=
ENV PDNS_AXFR=127.0.0.1
ENV DNS_GMYSQL_HOST=db
EXPOSE 53
EXPOSE 53/udp
EXPOSE 53 53/udp 5380
CMD ./start.sh
#!/bin/bash
SERVER_ARGS=`env|grep '^DNS_'|cut -c 5-|sed 's,_,-,g;s,^,--,'|tr "\n[:upper:]" " [:lower:]"`
pdns_server \
--daemon=no \
--master=yes \
--slave=yes \
--webserver=yes \
--disable-axfr=no \
--allow-axfr-ips=${PDNS_AXFR} \
--gmysql-host=db \
--gmysql-dbname=${PDNS_MYSQL_DB} \
--gmysql-user=${PDNS_MYSQL_USER} \
--gmysql-password=${PDNS_MYSQL_PASSWORD}
${SERVER_ARGS}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment