security: add non-root user to Dockerfile #120
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#120
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The container runs as root by default. For a service handling auth tokens and database credentials, this should be hardened.
Task
Add a non-root user to the Dockerfile:
Verify volume mounts (
storage,logs) still work with the new user.PR #122 opens the fix: #122
Added
appusersystem group/user after all root-required build steps, pre-created bothstorageandlogsvolume mount directories, appliedchown -R appuser:appuser /usr/src/app, and setUSER appuserbeforeCMD.