Changeset View
Changeset View
Standalone View
Standalone View
docker/pdns/Dockerfile
Show All 17 Lines | RUN dnf -y install \ | ||||
vim-enhanced \ | vim-enhanced \ | ||||
wget \ | wget \ | ||||
which && \ | which && \ | ||||
dnf clean all | dnf clean all | ||||
COPY pdns.conf /etc/pdns/pdns.conf | COPY pdns.conf /etc/pdns/pdns.conf | ||||
COPY recursor.conf /etc/pdns-recursor/recursor.conf | COPY recursor.conf /etc/pdns-recursor/recursor.conf | ||||
ARG DB_HOST | |||||
ARG DB_DATABASE | |||||
ARG DB_USERNAME | |||||
ARG DB_PASSWORD | |||||
RUN sed -i -r \ | |||||
-e "s|DB_HOST|$DB_HOST|g" \ | |||||
-e "s|DB_DATABASE|$DB_DATABASE|g" \ | |||||
-e "s|DB_USERNAME|$DB_USERNAME|g" \ | |||||
-e "s|DB_PASSWORD|$DB_PASSWORD|g" \ | |||||
/etc/pdns/pdns.conf | |||||
RUN systemctl disable systemd-resolved && systemctl enable pdns && systemctl enable pdns-recursor | RUN systemctl disable systemd-resolved && systemctl enable pdns && systemctl enable pdns-recursor | ||||
# This is how we could run pdns without systemd | # This is how we could run pdns without systemd | ||||
# ENV PDNS_guardian=yes \ | # ENV PDNS_guardian=yes \ | ||||
# PDNS_setuid=pdns \ | # PDNS_setuid=pdns \ | ||||
# PDNS_setgid=pdns \ | # PDNS_setgid=pdns \ | ||||
# PDNS_launch=gmysql | # PDNS_launch=gmysql | ||||
# CMD ["/usr/sbin/pdns_server", "--guardian=no", "--daemon=no", "--disable-syslog", "--log-timestamp=no", "--write-pid=no"] | # CMD ["/usr/sbin/pdns_server", "--guardian=no", "--daemon=no", "--disable-syslog", "--log-timestamp=no", "--write-pid=no"] | ||||
CMD ["/lib/systemd/systemd", "--system"] | CMD ["/lib/systemd/systemd", "--system"] | ||||
EXPOSE 53 53/udp | EXPOSE 53 53/udp |