Skip to content

Add non-root user to Dockerfile#4

Merged
pscheid92 merged 1 commit intomainfrom
add-non-root-docker-user
Feb 22, 2026
Merged

Add non-root user to Dockerfile#4
pscheid92 merged 1 commit intomainfrom
add-non-root-docker-user

Conversation

@pscheid92
Copy link
Owner

@pscheid92 pscheid92 commented Feb 22, 2026

Summary

  • Adds a non-root appuser to the runtime stage of the Dockerfile
  • Sets USER appuser before the entrypoint so the container no longer runs as root
  • Reduces blast radius of a potential container escape

Test plan

  • make docker-build succeeds
  • make docker-up starts and app functions normally
  • docker exec <container> whoami returns appuser

🤖 Generated with Claude Code

Run the container as an unprivileged user to limit the blast radius
of a potential container escape.
@pscheid92 pscheid92 merged commit a922aef into main Feb 22, 2026
1 check passed
@pscheid92 pscheid92 deleted the add-non-root-docker-user branch February 22, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant