-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·22 lines (19 loc) · 855 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM alpine:latest
ENV DOMAIN server.tld
ENV EMAIL [email protected]
ADD configs/. /etc/bind/
ADD entrypoint.sh /entrypoint.sh
RUN apk update \
&& apk add --no-cache bind bind-tools certbot python3 openssl ca-certificates \
&& rm -rf /var/cache/apk/* \
&& chmod -R 0770 /etc/bind && chown -R root:named /etc/bind \
&& mkdir -m 0770 -p /var/cache/bind && chown -R root:named /var/cache/bind \
&& wget -q -O /etc/bind/bind.keys https://ftp.isc.org/isc/bind9/keys/9.11/bind.keys.v9_11 \
&& rndc-confgen -a -r /dev/urandom \
&& pip3 install --upgrade pip setuptools \
&& pip3 install certbot-dns-rfc2136 \
&& echo "0 5 1 * * /usr/bin/certbot renew --no-self-upgrade" > /etc/crontabs/root \
&& chmod 711 /entrypoint.sh
VOLUME ["/etc/letsencrypt", "/etc/bind", "/var/cache/bind"]
EXPOSE 53 53/udp
CMD ["/entrypoint.sh"]