forked from psi-4ward/docker-powerdns
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (30 loc) · 1.34 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:3.21
MAINTAINER Christoph Wiechert <wio@psitrax.de>
ARG POWERDNS_VERSION
ENV POWERDNS_VERSION=${POWERDNS_VERSION:-4.8.0} \
MYSQL_DEFAULT_AUTOCONF=true \
MYSQL_DEFAULT_HOST="mysql" \
MYSQL_DEFAULT_PORT="3306" \
MYSQL_DEFAULT_USER="root" \
MYSQL_DEFAULT_PASS="root" \
MYSQL_DEFAULT_DB="pdns"
RUN apk --update add bash libpq sqlite-libs libstdc++ libgcc mariadb-client mariadb-connector-c lua-dev curl-dev && \
apk add --virtual build-deps \
g++ make mariadb-dev postgresql-dev sqlite-dev curl boost-dev mariadb-connector-c-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" && \
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 && \
cp /usr/lib/libboost_program_options.so* /tmp && \
apk del --purge build-deps && \
apk add boost-libs && \
mv /tmp/lib* /usr/lib/ && \
rm -rf /tmp/pdns-$POWERDNS_VERSION /var/cache/apk/*
ADD schema.sql pdns.conf /etc/pdns/
ADD entrypoint.sh /
EXPOSE 53/tcp 53/udp
ENTRYPOINT ["/entrypoint.sh"]