2018-01-02 19:04:34 +01:00
|
|
|
FROM alpine:latest
|
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates
|
|
|
|
|
2018-02-23 17:03:09 +01:00
|
|
|
ENV COREDNS_VERSION v1.0.6
|
2018-01-02 19:04:34 +01:00
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
make \
|
|
|
|
' \
|
|
|
|
set -x \
|
|
|
|
&& apk --no-cache add $buildDeps \
|
|
|
|
&& 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 \
|
2018-02-04 02:05:37 +01:00
|
|
|
&& make CHECKS="godeps" \
|
2018-01-02 19:04:34 +01:00
|
|
|
&& mv coredns /usr/bin/coredns \
|
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
|
|
|
|
2018-01-02 19:06:48 +01:00
|
|
|
ENTRYPOINT [ "coredns", "-log" ]
|