mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-12-10 06:52:40 +01:00
@@ -1,31 +1,26 @@
|
|||||||
FROM alpine:latest as builder
|
FROM golang:alpine as builder
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
ca-certificates
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
make
|
||||||
|
|
||||||
ENV COREDNS_VERSION v1.2.2
|
ENV COREDNS_VERSION v1.2.2
|
||||||
|
|
||||||
RUN set -x \
|
RUN git clone --depth 1 --branch ${COREDNS_VERSION} https://github.com/coredns/coredns /go/src/github.com/coredns/coredns
|
||||||
&& apk --no-cache add \
|
|
||||||
go \
|
WORKDIR /go/src/github.com/coredns/coredns
|
||||||
git \
|
|
||||||
gcc \
|
RUN make CHECKS="godeps" \
|
||||||
g++ \
|
&& mv coredns /usr/bin/coredns
|
||||||
libc-dev \
|
|
||||||
libgcc \
|
|
||||||
make \
|
|
||||||
&& git clone --depth 1 --branch ${COREDNS_VERSION} https://github.com/coredns/coredns /go/src/github.com/coredns/coredns \
|
|
||||||
&& cd /go/src/github.com/coredns/coredns \
|
|
||||||
&& make CHECKS="godeps" \
|
|
||||||
&& mv coredns /usr/bin/coredns \
|
|
||||||
&& echo "Build complete."
|
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
COPY --from=builder /usr/bin/coredns /usr/bin/coredns
|
COPY --from=builder /usr/bin/coredns /usr/bin/coredns
|
||||||
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
||||||
|
|
||||||
ENTRYPOINT [ "coredns", "-log" ]
|
ENTRYPOINT [ "coredns", "-log" ]
|
||||||
Reference in New Issue
Block a user