cert-manager-webhook-dnsimple/Dockerfile

24 lines
418 B
Text
Raw Normal View History

2024-04-02 16:01:27 -05:00
FROM golang:1.22-alpine3.18 AS build_deps
2024-04-02 14:01:36 -05:00
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"' .
2024-05-22 13:32:02 -05:00
FROM alpine:3.20
2024-04-02 14:01:36 -05:00
RUN apk add --no-cache ca-certificates
COPY --from=build /workspace/webhook /usr/local/bin/webhook
ENTRYPOINT ["webhook"]