-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (31 loc) · 1.31 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
37
38
39
40
41
42
43
# FROM alpine:latest
# FROM internetsystemsconsortium/bind9:9.16
FROM ubuntu:focal
MAINTAINER Shane Mc Cormack <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
RUN apt-get -qqqy update
RUN apt-get -qqqy install apt-utils software-properties-common dctrl-tools
ARG DEB_VERSION=1:9.16.21-1+ubuntu20.04.1+isc+1
RUN add-apt-repository -y ppa:isc/bind
RUN apt-get -qqqy update && apt-get -qqqy dist-upgrade && apt-get -qqqy install bind9=$DEB_VERSION bind9-utils=$DEB_VERSION bind9-dnsutils=$DEB_VERSION
RUN mkdir -p /etc/bind && chown root:bind /etc/bind/ && chmod 755 /etc/bind
RUN mkdir -p /var/cache/bind && chown bind:bind /var/cache/bind && chmod 755 /var/cache/bind
RUN mkdir -p /var/lib/bind && chown bind:bind /var/lib/bind && chmod 755 /var/lib/bind
RUN mkdir -p /var/log/bind && chown bind:bind /var/log/bind && chmod 755 /var/log/bind
RUN mkdir -p /run/named && chown bind:bind /run/named && chmod 755 /run/named
# RUN set -x \
# && apk add --no-cache bash bind \
# && rm -rf /var/cache/apk/*
EXPOSE 53
EXPOSE 53/udp
COPY mydnshost-entrypoint.sh /
COPY bind /etc/bind
RUN set -x \
&& mkdir /bind \
&& mkdir /etc/bind/data \
&& mkdir /bind/keys \
&& ln -s /bind/keys /etc/bind/keys \
&& chmod +x /mydnshost-entrypoint.sh
ENTRYPOINT [ "/mydnshost-entrypoint.sh" ]
CMD [""]