Ensure a user for the container has been created
Error: A user for the container has not been created
Bridgecrew Policy ID: BC_DKR_3
Checkov Check ID: CKV_DOCKER_3
Severity: LOW
A user for the container has not been created
Description
Containers should run as a non-root user. It is good practice to run the container as a non-root user, where possible. This can be done either via the USER
directive in the Dockerfile
or through gosu
or similar where used as part of the CMD
or ENTRYPOINT
directives.
Fix - Buildtime
Docker
FROM base
LABEL foo="bar baz
USER me
Updated 11 months ago