File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,16 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags="-w -s" -o manage
24
24
25
25
# Runtime Stage
26
26
# Use a distroless image for a minimal attack surface
27
- FROM gcr.io/distroless/static-debian11:nonroot AS runtime
28
- # For debugging, you might temporarily use a different base like alpine:
29
- # FROM alpine:latest
30
- # RUN apk add --no-cache ca-certificates
27
+ FROM alpine:latest AS runtime
28
+
29
+ RUN apk add --no-cache ca-certificates
31
30
32
31
WORKDIR /
33
32
# Copy the compiled binary from the builder stage
34
33
COPY --from=builder /workspace/manager .
35
- # Copy CA certificates if needed (distroless/static usually includes them)
36
- # COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
37
34
38
- USER nonroot:nonroot
35
+ # Use a non-root user (nobody:65534 is available in Alpine)
36
+ USER nobody
39
37
40
38
# The binary is the entrypoint
41
39
ENTRYPOINT ["/manager" ]
You can’t perform that action at this time.
0 commit comments