2020-03-03 00:24:19 +08:00
|
|
|
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
|
2020-01-28 23:42:31 +08:00
|
|
|
RUN GO111MODULE=on 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
|
2019-12-18 00:24:49 +08:00
|
|
|
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
|
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
|
2019-12-18 00:24:49 +08:00
|
|
|
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
|
2017-09-27 00:02:01 +08:00
|
|
|
CMD dnscontrol
|