Security / Public reference
Container runs as root
A Dockerfile whose last USER is root or 0, or a Dockerfile with no USER instruction.
- What you need to supply
- The Dockerfile text. The check does not build or run the image.
- If it reports a finding
- High severity. The suggested next step is to end the image with a non-root USER the image already supports.
- What this does not prove
- A root user that exists only in a comment is not a USER instruction. No finding does not prove the running container is unprivileged.
Instruction that this check is written to notice
USER root
Proposed change
When this line appears once, the review proposes this change.
USER root becomes USER nobody
All review checks. Reading this page does not submit your infrastructure.