From 2be2238c37318671834672a08ee250824f58ee85 Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Wed, 16 Nov 2022 11:37:26 -0600 Subject: [PATCH] Suggest using Chainguard images Signed-off-by: Antonette Caldwell --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f18ad484..decce27f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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