Skip to content

Commit 1016124

Browse files
committed
build: update base image and set user for artifact server
Set the user to `8737` and adjusted file ownership during the copy of the artifact server binary so that it runs as non-root by default
1 parent 49a05eb commit 1016124

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ COPY . .
2525
RUN make -j 4 artifact-server
2626

2727
# Runtime stage
28-
FROM scratch
28+
FROM gcr.io/distroless/static
29+
30+
USER 8737
2931

3032
# Copy the binary from builder stage
31-
COPY --from=builder /app/artifact-server /artifact-server
33+
COPY --chown=8737 --from=builder /app/artifact-server /artifact-server
3234

3335
# Set the binary as entrypoint
3436
ENTRYPOINT ["/artifact-server"]

0 commit comments

Comments
 (0)