dnscontrol/Dockerfile

18 lines
583 B
Text
Raw Normal View History

FROM golang:1.14-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 GO111MODULE=on go run build/build.go -os=linux
RUN cp dnscontrol-Linux /go/bin/dnscontrol
2017-09-13 02:06:44 +08:00
RUN dnscontrol version
RUN go build -o cmd/convertzone/convertzone cmd/convertzone/main.go
RUN cp cmd/convertzone/convertzone /go/bin/convertzone
2017-09-13 02:06:44 +08:00
2017-09-18 21:44:24 +08:00
FROM alpine
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
COPY --from=build-env /go/bin/convertzone /usr/local/bin
2017-09-13 02:06:44 +08:00
WORKDIR /dns
2017-09-18 21:44:24 +08:00
RUN dnscontrol version
CMD dnscontrol