From 31ec0e44101b464f9b44893cea4e624c11a08be0 Mon Sep 17 00:00:00 2001 From: Bartosz Blizniak Date: Wed, 10 Jun 2026 12:59:35 +0100 Subject: [PATCH] fix(docker): run container as non-root user --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 946a2db9..8997fb10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,9 @@ RUN mkdir -p /opt/cloudsmith \ && curl -1sLf -o /opt/cloudsmith/cloudsmith "https://dl.cloudsmith.io/public/${CLOUDSMITH_NAMESPACE}/${CLOUDSMITH_REPO}/raw/names/cloudsmith-cli/versions/${CLOUDSMITH_CLI_VERSION}/cloudsmith.pyz" \ && chmod +x /opt/cloudsmith/cloudsmith +# Run as a non-root user +RUN adduser -D -u 1000 cloudsmith +USER cloudsmith + # Default command ENTRYPOINT [ "cloudsmith" ]