2018-10-02 22:29:32 +08:00
|
|
|
FROM golang:1.10-alpine AS build-env
|
2017-09-13 02:06:44 +08:00
|
|
|
WORKDIR /go/src/github.com/StackExchange/dnscontrol
|
|
|
|
ADD . .
|
2017-09-18 21:44:24 +08:00
|
|
|
RUN apk update && apk add git
|
|
|
|
RUN go run build/build.go -os=linux
|
2017-09-15 22:22:08 +08:00
|
|
|
RUN cp dnscontrol-Linux /go/bin/dnscontrol
|
2017-09-13 02:06:44 +08:00
|
|
|
RUN dnscontrol version
|
|
|
|
|
2017-09-18 21:44:24 +08:00
|
|
|
FROM alpine
|
2017-09-27 00:02:01 +08:00
|
|
|
RUN apk add --no-cache ca-certificates
|
2017-09-13 02:06:44 +08:00
|
|
|
COPY --from=build-env /go/bin/dnscontrol /usr/local/bin
|
|
|
|
WORKDIR /dns
|
2017-09-18 21:44:24 +08:00
|
|
|
RUN dnscontrol version
|
2017-09-27 00:02:01 +08:00
|
|
|
CMD dnscontrol
|