2018-01-30 22:26:44 +00:00
|
|
|
FROM golang:alpine
|
|
|
|
|
2018-02-05 06:03:08 +00:00
|
|
|
ARG COREDNS_VERSION=v1.0.5
|
|
|
|
|
2018-01-30 22:26:44 +00:00
|
|
|
ADD ./build.sh /usr/local/bin/build.sh
|
2018-02-05 06:03:08 +00:00
|
|
|
ADD ./cron_generate.go /src/cron_generate.go
|
2018-01-30 22:26:44 +00:00
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add git bash \
|
|
|
|
&& bash /usr/local/bin/build.sh
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
|
|
|
|
|
|
|
COPY --from=0 /go/bin/coredns /usr/local/bin/
|
|
|
|
|
2018-02-05 06:03:08 +00:00
|
|
|
ADD ./requirements.txt /src/requirements.txt
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add python3 \
|
|
|
|
&& pip3 install -r /src/requirements.txt
|
|
|
|
|
2018-01-30 22:26:44 +00:00
|
|
|
ADD . /src
|
|
|
|
WORKDIR /src
|
|
|
|
|
2018-02-01 08:02:01 +00:00
|
|
|
EXPOSE 53/udp 53
|
2018-01-30 22:26:44 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/coredns"]
|
|
|
|
CMD ["--"]
|