mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 18:08:57 +08:00
f0aac108c4
Bumps alpine from `6c1b238` to `bc41182`. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
30 lines
778 B
Docker
30 lines
778 B
Docker
FROM golang:1.19.0-alpine3.16@sha256:f8e128fa8aa891fe29e22e6401686dffef9bd4c3f5b552b09a7c29f7379979c1 AS build
|
|
|
|
WORKDIR /go/src/github.com/StackExchange/dnscontrol
|
|
|
|
ARG BUILD_VERSION
|
|
|
|
ENV GO111MODULE on
|
|
|
|
COPY . .
|
|
|
|
# build dnscontrol
|
|
RUN apk update \
|
|
&& apk add --no-cache ca-certificates curl gcc build-base git \
|
|
&& update-ca-certificates \
|
|
&& go build -v -trimpath -buildmode=pie -ldflags="-s -w -X main.SHA=${BUILD_VERSION}"
|
|
|
|
# Validation check
|
|
RUN cp dnscontrol /go/bin/dnscontrol
|
|
RUN dnscontrol version
|
|
|
|
# -----
|
|
|
|
FROM alpine:3.16.2@sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad
|
|
|
|
COPY --from=build /etc/ssl/certs /etc/ssl/certs
|
|
COPY --from=build /go/bin/dnscontrol /usr/local/bin
|
|
|
|
WORKDIR /dns
|
|
|
|
ENTRYPOINT ["/usr/local/bin/dnscontrol"]
|