mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
aaf7e424aa
Signed-off-by: Jess Frazelle <acidburn@jessfraz.com>
28 lines
613 B
Docker
28 lines
613 B
Docker
FROM golang:1.12-alpine as builder
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
ca-certificates \
|
|
git \
|
|
make
|
|
|
|
ENV COREDNS_VERSION v1.6.2
|
|
|
|
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 all \
|
|
&& mv coredns /usr/bin/coredns
|
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /usr/bin/coredns /usr/bin/coredns
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
|
|
|
ENTRYPOINT [ "coredns", "-log" ]
|