There was an error while loading. Please reload this page.
1 parent 369db48 commit e177815Copy full SHA for e177815
1 file changed
Dockerfile.controller
@@ -0,0 +1,17 @@
1
+# Build stage — builds from cmd/controller/ which has a replace directive
2
+# pointing to ../../ (the root module containing the patched sync.go)
3
+FROM golang:1.25 AS builder
4
+WORKDIR /workspace
5
+COPY . .
6
+WORKDIR /workspace/cmd/controller
7
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
8
+ go build \
9
+ -ldflags="-s -w -X github.com/cert-manager/cert-manager/pkg/util.AppVersion=v1.20.2-pf9.1" \
10
+ -o /controller \
11
+ .
12
+
13
+# Runtime stage — matches upstream cert-manager base image
14
+FROM gcr.io/distroless/static-debian12@sha256:5074667eecabac8ac5c5d395100a153a7b4e8426181cca36181cd019530f00c8
15
+COPY --from=builder /controller /controller
16
+USER nonroot:nonroot
17
+ENTRYPOINT ["/controller"]
0 commit comments