2018-09-14 22:43:52 +02:00
|
|
|
FROM golang: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 \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
make
|
2018-01-02 19:04:34 +01:00
|
|
|
|
2019-03-08 16:31:44 +01:00
|
|
|
ENV COREDNS_VERSION v1.4.0
|
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
|
|
|
|
|
|
|
|
RUN make CHECKS="godeps" \
|
|
|
|
&& 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" ]
|