Skip to content

Commit fd7fa2f

Browse files
fix(docker): run container as non-root user (#310)
1 parent 19b865b commit fd7fa2f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,9 @@ RUN mkdir -p /opt/cloudsmith \
1616
&& 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" \
1717
&& chmod +x /opt/cloudsmith/cloudsmith
1818

19+
# Run as a non-root user
20+
RUN adduser -D -u 1000 cloudsmith
21+
USER cloudsmith
22+
1923
# Default command
2024
ENTRYPOINT [ "cloudsmith" ]

0 commit comments

Comments
 (0)