mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-10 17:38:13 +08:00
2f83aa9302
* Switched to v2 go.mod Also set GO111MODULE=on in build stuff to always use Go modules even when in GOPATH. * Ensure go.mod, go.sum, and vendor are up to date * Attempt to fix Azure pipelines * Add set -e to properly fail on exit (it didn't seem to be propagating properly before). * Set workingDirectory for GoFmt and GoGen (this might be why it fails unlike compile and unitests). * Another attempt to fix Azure Pipelines * Use the Go env template for all go-related jobs. * Completely fixed Azure Pipelines * Added a display name to GoFmt for consistency. * Fixed diffs for GoFmt and GoGen. * Show git status for checks. * Drop GOPATH for tests TODO: Do the same for integration tests. * Drop GOPATH for integration tests * Show more diffs * Regenerate provider support matrix This wasn't done in #590...
17 lines
583 B
Docker
17 lines
583 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 GO111MODULE=on 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
|