Skip to content

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

Merged
Mirko-von-Leipzig merged 3 commits into
0xMiden:nextfrom
crazywriter1:chore/docker-non-root-user
Aug 24, 2026
Merged

chore: run Docker runtime as non-root user#2495
Mirko-von-Leipzig merged 3 commits into
0xMiden:nextfrom
crazywriter1:chore/docker-non-root-user

Conversation

@crazywriter1

@crazywriter1 crazywriter1 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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
Contributor 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

@crazywriter1
crazywriter1 requested a review from sergerad August 23, 2026 13:51
@Mirko-von-Leipzig
Mirko-von-Leipzig merged commit 6e4a334 into 0xMiden:next Aug 24, 2026
25 checks passed
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

4 participants