Skip to content

chore: run Docker runtime as non-root user - #2495

Open
crazywriter1 wants to merge 3 commits into
0xMiden:nextfrom
crazywriter1:chore/docker-non-root-user
Open

chore: run Docker runtime as non-root user#2495
crazywriter1 wants to merge 3 commits into
0xMiden:nextfrom
crazywriter1:chore/docker-non-root-user

Conversation

@crazywriter1

@crazywriter1 crazywriter1 commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Closes #2492.

Runtime images currently start as root. This adds an unprivileged miden user (uid/gid 10001) and sets USER miden on runtime-common, so runtime and runtime-tool inherit it.

/data is created and owned by that user in the image so a first-use named volume mounted at /data inherits the ownership. Without that, Docker creates the volume as root:root and the process cannot write. Builder stages, COPY, and CMD are unchanged.

Existing volumes that were written as root need chown -R 10001:10001 or 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

[[entry]]
scope       = "node"
impact      = "changed"
description = "Docker runtime images now run as a non-root `miden` user (uid 10001)."

@sergerad
sergerad requested a review from kkovaacs August 20, 2026 21:03
@crazywriter1

Copy link
Copy Markdown
Author

The changelog check failed because the toml fence in the PR description was not closed (the inner closing backticks were eaten on paste). I’ll close that fence in the description, no code change. @sergerad @kkovaacs

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.

Docker user should be non-root

3 participants