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-01-29 20:45:30 +01:00
|
|
|
ENV COREDNS_VERSION v1.0.5
|
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 \
|
|
|
|
&& make \
|
|
|
|
&& 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" ]
|