Repository navigation
GIT-39: PhotoPrism starts as root, drops to uid 1000 - #8
Merged
Merged
Conversation
…t can't boot s6-overlay)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The chart's default
securityContext(runAsUser 1000) can't boot the image. Its s6-overlay/initneeds/runowned by the container user, and the chart has no way to mount a volume there:Fix, values only (no fork): start as uid 0 with
drop: [ALL], adding back only CHOWN/SETUID/SETGID/DAC_OVERRIDE/FOWNER, withallowPrivilegeEscalation: falseand seccomp RuntimeDefault kept. ThenPHOTOPRISM_UID/GID=1000has PhotoPrism's init drop the app process to 1000, which is the upstream docker-compose model.Verified in local Docker with the same restrictions: the
photoprismprocess runs as uid 1000, storage files are owned by 1000:1000, and/api/v1/statusreturns 200. The alternative (a/runemptyDir +S6_YES_I_WANT_A_WORLD_WRITABLE_RUN_BECAUSE_KUBERNETES) also works, but it needs a forked chart.🤖 Generated with Claude Code