cert-manager-webhook-dnsimple/Dockerfile
jahanson 306385ce06
All checks were successful
/ test (push) Successful in 12m26s
revert 94e11a2240
revert Merge pull request 'Update alpine Docker tag to v3.21' (#37) from renovate/alpine-3.x into main

Reviewed-on: #37
2025-01-04 23:26:54 -06:00

24 lines
No EOL
418 B
Docker

FROM golang:1.22-alpine3.18 AS build_deps
RUN apk add --no-cache git
WORKDIR /workspace
COPY go.mod .
COPY go.sum .
RUN go mod download
FROM build_deps AS build
COPY . .
RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' .
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=build /workspace/webhook /usr/local/bin/webhook
ENTRYPOINT ["webhook"]