Helloworld image running with non root user (#1787)

This commit is contained in:
Martin Gencur 2023-03-17 10:57:01 +01:00 committed by GitHub
parent 166872069e
commit 3e19a354bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -21,5 +21,7 @@ RUN apk add --no-cache ca-certificates
# Copy the binary to the production image from the builder stage. # Copy the binary to the production image from the builder stage.
COPY --from=builder /app/server /server COPY --from=builder /app/server /server
USER 65532
# Run the web service on container startup. # Run the web service on container startup.
CMD ["/server"] CMD ["/server"]