Skip to content

Commit

Permalink
Suggest using Chainguard images
Browse files Browse the repository at this point in the history
Signed-off-by: Antonette Caldwell <[email protected]>
  • Loading branch information
acald-creator committed Nov 16, 2022
1 parent 3384958 commit 775b8ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19 as builder
FROM cgr.dev/chainguard/go:latest as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -18,9 +18,8 @@ COPY pkg/ pkg/
# Build
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
# Instead of using distroless, use Chainguard images
FROM cgr.dev/chainguard/static:latest
WORKDIR /
COPY --from=builder /workspace/manager .
USER nonroot:nonroot
Expand Down

0 comments on commit 775b8ac

Please sign in to comment.