2019-05-25 15:25:24 +00:00
|
|
|
FROM golang:alpine as builder
|
2018-05-09 15:23:04 +00:00
|
|
|
|
2020-04-18 11:26:19 +00:00
|
|
|
ENV GO111MODULE=on
|
|
|
|
|
2018-05-09 15:23:04 +00:00
|
|
|
COPY . /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
RUN set -ex \
|
2019-05-25 15:25:24 +00:00
|
|
|
&& apk --no-cache add \
|
2019-08-23 13:11:22 +00:00
|
|
|
bash \
|
2019-05-25 15:25:24 +00:00
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
make \
|
2020-04-18 11:26:19 +00:00
|
|
|
&& bash /src/gotools.sh \
|
2019-05-25 15:25:24 +00:00
|
|
|
&& rootzone >named.stubs \
|
2018-05-09 15:23:04 +00:00
|
|
|
&& make blacklist
|
|
|
|
|
|
|
|
# ------
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
|
|
|
|
|
|
|
COPY build.sh /usr/local/bin/
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add \
|
|
|
|
bash \
|
|
|
|
bind \
|
|
|
|
bind-tools \
|
|
|
|
&& /usr/local/bin/build.sh
|
|
|
|
|
2020-01-25 19:18:05 +00:00
|
|
|
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/
|
2018-05-09 15:23:04 +00:00
|
|
|
|
|
|
|
EXPOSE 53/udp 53
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s \
|
2019-08-25 15:03:46 +00:00
|
|
|
CMD dig +short @localhost health.pdns.luzifer.io A || exit 1
|
2018-05-09 15:23:04 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|