FROM robinthoni/debian-multiarch:jessie MAINTAINER Robin Thoni ARG CONFIG_DIR=/etc/default/config-files/ RUN apt-get update && \ apt-get install -y curl && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN dist=$(if uname -m | grep -iq arm ; then echo raspbian; else echo debian; fi) &&\ echo "deb http://repo.powerdns.com/${dist} jessie-auth-40 main" > /etc/apt/sources.list.d/pdns.list && \ echo 'Package: pdns-*\nPin: origin repo.powerdns.com\nPin-Priority: 600' > /etc/apt/preferences.d/pdns && \ curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - COPY ./preseed.txt /tmp/preseed.txt RUN debconf-set-selections /tmp/preseed.txt RUN DEBIAN_FRONTEND=noninteractive apt-get update &&\ apt-get install -y pdns-server pdns-backend-pgsql &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN rm -rf /var/log/* RUN rm -rf /etc/powerdns/* COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./common.sh /common.sh COPY ./run.sh /run.sh RUN mkdir "${CONFIG_DIR}" COPY ./config/pdns.conf "${CONFIG_DIR}"/pdns.conf EXPOSE 53/udp CMD ["/run.sh"]