forked from psi-4ward/docker-powerdns
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (31 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM alpine
LABEL MAINTAINER="Christoph Wiechert <[email protected]>"
ENV REFRESHED_AT="2018-01-27" \
POWERDNS_VERSION=4.1.0 \
MYSQL_AUTOCONF=true \
MYSQL_HOST="mysql" \
MYSQL_PORT="3306" \
MYSQL_USER="root" \
MYSQL_PASS="root" \
MYSQL_DB="pdns" \
API=false \
API_KEY="changeme" \
ALLOW_AXFR=false \
ALLOW_AXFR_IPS="127.0.0.1/32"
RUN apk --update add mysql-client mariadb-client-libs libpq sqlite-libs libstdc++ libgcc && \
apk add --virtual build-deps \
g++ make mariadb-dev postgresql-dev sqlite-dev curl boost-dev && \
curl -sSL https://downloads.powerdns.com/releases/pdns-$POWERDNS_VERSION.tar.bz2 | tar xj -C /tmp && \
cd /tmp/pdns-$POWERDNS_VERSION && \
./configure --prefix="" --exec-prefix=/usr --sysconfdir=/etc/pdns \
--with-modules="bind gmysql gpgsql gsqlite3" --without-lua && \
make && make install-strip && cd / && \
mkdir -p /etc/pdns/conf.d && \
addgroup -S pdns 2>/dev/null && \
adduser -S -D -H -h /var/empty -s /bin/false -G pdns -g pdns pdns 2>/dev/null && \
apk del --purge build-deps && \
rm -rf /tmp/pdns-$POWERDNS_VERSION /var/cache/apk/*
ADD schema.sql pdns.conf /etc/pdns/
ADD entrypoint.sh /
EXPOSE 53/tcp 53/udp 8081/tcp
ENTRYPOINT ["/entrypoint.sh"]