Skip to content

Commit 427a05c

Browse files
committed
fix: add production stage to Dockerfile
Signed-off-by: Tyler Gillson <[email protected]>
1 parent 53760d4 commit 427a05c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.20 as builder
2+
FROM --platform=$TARGETPLATFORM golang:1.22 AS builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

@@ -25,7 +25,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma
2525

2626
# Use distroless as minimal base image to package the manager binary
2727
# Refer to https://github.com/GoogleContainerTools/distroless for more details
28-
FROM gcr.io/distroless/static:nonroot
28+
FROM gcr.io/distroless/static:nonroot AS production
2929
WORKDIR /
3030
COPY --from=builder /workspace/manager .
3131
USER 65532:65532

0 commit comments

Comments
 (0)