Skip to content

Commit

Permalink
Use 'scratch' for runtime image
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Asthana <[email protected]>
  • Loading branch information
anishasthana committed Jul 6, 2023
1 parent 677841e commit b367a33
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ray-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b367a33

Please sign in to comment.