chore: run Docker runtime as non-root user - #2495
Open
crazywriter1 wants to merge 3 commits into
Open
Conversation
sergerad
approved these changes
Aug 20, 2026
Author
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.
Summary
Closes #2492.
Runtime images currently start as root. This adds an unprivileged
midenuser (uid/gid 10001) and setsUSER midenonruntime-common, soruntimeandruntime-toolinherit it./datais created and owned by that user in the image so a first-use named volume mounted at/datainherits the ownership. Without that, Docker creates the volume as root:root and the process cannot write. Builder stages,COPY, andCMDare unchanged.Existing volumes that were written as root need
chown -R 10001:10001or to be recreated. New volumes are unaffected. If maintainers want an automatic migration for those volumes, I can add it as a follow-up.Changelog