hermes - 💡(How to fix) Fix v0.11.0 Dockerfile: final `USER hermes` breaks entrypoint UID remap, contradicts docs [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#15832Fetched 2026-04-26 05:24:45
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Fix Action

Fix

Add `USER root` after the venv install step in the Dockerfile, before `ENTRYPOINT`. The v0.10.0 Dockerfile had this; v0.11.0 lost it during the refactor that introduced the `web/` build layer.

Workaround

`user: "0:0"` in compose forces root start; entrypoint then drops to `HERMES_UID` correctly.

RAW_BUFFERClick to expand / collapse

The v0.11.0 Dockerfile (line 46) ends with USER hermes and never restores USER root. As a result, the container starts as the baked-in hermes user (UID 10000), and the entrypoint's UID-remap branch (entrypoint.sh:11) — gated on id -u == 0 — is silently skipped.

The user-guide docs (website/docs/user-guide/docker.md:256) state "The container runs as root by default." The Dockerfile contradicts this.

Symptom

mkdir: cannot create directory '/opt/data': Permission denied in a tight crash loop, when the host-side data dir is owned by anything other than UID 10000.

Repro

```yaml services: hermes: image: hermes:v2026.4.23 environment: - HERMES_UID=1002 - HERMES_GID=1002 volumes: - ./data:/opt/data # owned by host UID 1002 ```

Workaround

`user: "0:0"` in compose forces root start; entrypoint then drops to `HERMES_UID` correctly.

Fix

Add `USER root` after the venv install step in the Dockerfile, before `ENTRYPOINT`. The v0.10.0 Dockerfile had this; v0.11.0 lost it during the refactor that introduced the `web/` build layer.

Diff vs v0.10.0

v0.10.0 had `USER root` at line 41 specifically to enable runtime UID remap. v0.11.0's restructured layout puts `USER hermes` at line 46 with no subsequent `USER root`.

extent analysis

TL;DR

Add USER root after the venv install step in the Dockerfile to restore the root user and enable runtime UID remap.

Guidance

  • The issue is caused by the Dockerfile not restoring the USER root after setting USER hermes, resulting in the container starting as the hermes user instead of root.
  • To fix this, add USER root after the venv install step in the Dockerfile, before ENTRYPOINT.
  • Verify that the container starts as root by checking the user ID in the container logs or by running a command inside the container.
  • As a temporary workaround, setting user: "0:0" in the compose file forces the container to start as root, allowing the entrypoint to drop to the correct user ID.

Example

No code snippet is necessary, as the fix is a simple addition to the Dockerfile.

Notes

This fix assumes that the intention is to run the container as root by default, as stated in the user-guide docs. The change in the Dockerfile between v0.10.0 and v0.11.0 introduced this issue.

Recommendation

Apply the workaround by adding USER root to the Dockerfile, as this fixes the underlying issue and allows the container to start as root, enabling runtime UID remap.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING