mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
17 lines
568 B
Docker
17 lines
568 B
Docker
FROM golang:1.13-alpine AS build-env
|
|
WORKDIR /go/src/github.com/StackExchange/dnscontrol
|
|
ADD . .
|
|
RUN apk update && apk add git
|
|
RUN go run build/build.go -os=linux
|
|
RUN cp dnscontrol-Linux /go/bin/dnscontrol
|
|
RUN dnscontrol version
|
|
RUN go build -o cmd/convertzone/convertzone cmd/convertzone/main.go
|
|
RUN cp cmd/convertzone/convertzone /go/bin/convertzone
|
|
|
|
FROM alpine
|
|
RUN apk add --no-cache ca-certificates
|
|
COPY --from=build-env /go/bin/dnscontrol /usr/local/bin
|
|
COPY --from=build-env /go/bin/convertzone /usr/local/bin
|
|
WORKDIR /dns
|
|
RUN dnscontrol version
|
|
CMD dnscontrol
|