Skip to content

Commit

Permalink
Dockerfile: use non-root user for docker container
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Awnallah <[email protected]>
  • Loading branch information
mohamedawnallah committed Jul 8, 2024
1 parent a80ecc0 commit f1bb911
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM scratch

# Create a user and group with a specific UID and GID.
USER 1000:1000

COPY scanner-clair /scanner-clair

# Switch to the non-root user.
USER 1000:1000

ENTRYPOINT ["/scanner-clair"]

0 comments on commit f1bb911

Please sign in to comment.