From f1bb9110824c7f751450128f3a45a6134c466a0e Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Mon, 8 Jul 2024 17:42:15 +0000 Subject: [PATCH] Dockerfile: use non-root user for docker container Signed-off-by: Mohamed Awnallah --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index a60f2b3..71bfd01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]