mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-25 08:02:58 +08:00
Bumps golang from `c722e06` to `dda10a0`. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... 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.18.5-alpine3.16@sha256:dda10a0c69473a595ab11ed3f8305bf4d38e0436b80e1462fb22c9d8a1c1e808 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.1@sha256:7580ece7963bfa863801466c0a488f11c86f85d9988051a9f9c68cb27f6b7872
|
|
|
|
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"]
|