From b367a330d2fe552166c7bcba50d8ae42329911fe Mon Sep 17 00:00:00 2001 From: Anish Asthana Date: Fri, 30 Jun 2023 15:18:33 -0400 Subject: [PATCH] Use 'scratch' for runtime image Signed-off-by: Anish Asthana --- ray-operator/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ray-operator/Dockerfile b/ray-operator/Dockerfile index c864ec62b1..9c550d8074 100644 --- a/ray-operator/Dockerfile +++ b/ray-operator/Dockerfile @@ -18,9 +18,7 @@ COPY controllers/ controllers/ USER root RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 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 +FROM scratch WORKDIR / COPY --from=builder /workspace/manager . USER 65532:65532