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
|
|
|
|
2018-12-18 16:51:49 +01:00
|
|
|
ENV COREDNS_VERSION v1.3.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" ]
|