-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
36 lines (24 loc) · 885 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:1.20-alpine 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.18
RUN apk add --no-cache ca-certificates
COPY --from=build /workspace/webhook /usr/local/bin/webhook
ARG VERSION
ARG VCS_REF
ARG BUILD_DATE
LABEL org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.vcs-ref=${VCS_REF} \
org.label-schema.vcs-url="https://github.com/exoscale/cert-manager-webhook-exoscale" \
org.label-schema.version=${VERSION} \
org.label-schema.name="cert-manager-webhook-exoscale" \
org.label-schema.vendor="Exoscale" \
org.label-schema.description="Cert-manager Webhook for Exoscale" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["webhook"]