2019-09-16 23:00:18 +02:00
|
|
|
FROM golang:1.12-alpine as builder
|
2018-01-02 19:04:34 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2018-09-14 22:43:52 +02:00
|
|
|
RUN apk --no-cache add \
|
2019-05-25 22:41:50 +02:00
|
|
|
bash \
|
2018-09-14 22:43:52 +02:00
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
make
|
2018-01-02 19:04:34 +01:00
|
|
|
|
2019-09-17 02:41:08 +02:00
|
|
|
ENV COREDNS_VERSION v1.6.3
|
2018-01-02 19:04:34 +01:00
|
|
|
|
2018-09-14 22:43:52 +02:00
|
|
|
RUN git clone --depth 1 --branch ${COREDNS_VERSION} https://github.com/coredns/coredns /go/src/github.com/coredns/coredns
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/coredns/coredns
|
|
|
|
|
2019-05-25 22:41:50 +02:00
|
|
|
RUN make all \
|
2018-09-14 22:43:52 +02:00
|
|
|
&& mv coredns /usr/bin/coredns
|
2018-09-14 22:36:30 +02:00
|
|
|
|
|
|
|
FROM alpine:latest
|
2018-01-02 19:04:34 +01:00
|
|
|
|
2018-09-14 22:36:30 +02:00
|
|
|
COPY --from=builder /usr/bin/coredns /usr/bin/coredns
|
2018-09-14 22:43:52 +02:00
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2018-01-02 19:04:34 +01:00
|
|
|
|
2018-09-14 22:43:52 +02:00
|
|
|
ENTRYPOINT [ "coredns", "-log" ]
|