-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
44 lines (32 loc) · 934 Bytes
/
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
44
FROM golang:alpine as builder
ENV GO111MODULE=on
COPY . /src
WORKDIR /src
RUN set -ex \
&& apk --no-cache add \
bash \
curl \
git \
make \
&& bash /src/gotools.sh \
&& rootzone >named.stubs \
&& make blacklist
# ------
FROM alpine:latest
LABEL maintainer Knut Ahlers <[email protected]>
COPY build.sh /usr/local/bin/
RUN set -ex \
&& apk --no-cache add \
bash \
bind \
bind-tools \
&& /usr/local/bin/build.sh
COPY --from=builder /go/bin/bind-log-metrics /usr/local/bin/
COPY --from=builder /src/named.stubs /etc/bind/
COPY --from=builder /src/named.blacklist /etc/bind/
COPY named.conf /etc/bind/
COPY docker-entrypoint.sh /usr/local/bin/
EXPOSE 53/udp 53
HEALTHCHECK --interval=30s --timeout=5s \
CMD dig +short @localhost health.pdns.luzifer.io A || exit 1
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]