Document Linux Docker user mapping#1428
Conversation
|
@koriyoshi2041 is attempting to deploy a commit to the openhands Team on Vercel. A member of the Team first needs to authorize it. |
|
There's another permission issue to deal with, ensuring the current user is in the proper group. I think that's already in the docs, but both permission issues could be clearly put together. |
|
Now, if I want to use Docker Compose instead, it gets a bit more problematic. I cannot use Why is it running as a different user to begin with? Is there a cleaner solution? I think the documentation could include Docker Compose as well. Should the home page instructions have any change? It's only partial instructions that will fail with permission issues. Have to dig deeper into the documentation to know that Docker Desktop app isn't strictly required; probably after seeing the failed permissions problem. That cycle of digging-after-error could be avoided. What about the image version, should a fixed version be set in the documentation, that gets outdated pretty quick, or set it as 'latest'? |
|
Thanks, that Compose case is a good catch. I added a short rootful-Linux Compose example in the README using |
|
Hey @koriyoshi2041 and @mysteryx93 thank you very much for the PR and the review of the PR. @mysteryx93 Could you confirm that the last commit is adressing your point? After that I think we are good to go. |
|
As for exporting environment variable, it's honestly very cumbersome. Even if I add that into a script, it's only valid within that script and must be re-defined when calling Setting This works for me. |
|
Thanks, that makes sense. I pushed d5bb08b to simplify the Compose example: it no longer requires exported UID/GID variables, and instead shows a direct |
d5bb08b to
f5625d1
Compare
|
|
|
You are right; I worded my last reply poorly. The pushed head uses volumes:
- "${HOME}/.openhands:/home/openhands/.openhands"
- "${HOME}/projects:/projects"I kept the default aligned with the existing README |
|
ok looking much better. Could definitely have another PR for changing "projects" to "Projects" (otherwise you end up with both folders on your computers which is weird and confusing), and for changing fixed old version to latest. |
Why
Linux users running rootful Docker Engine can hit write permission errors on the bind-mounted
~/.openhandsdirectory because the container runs as the baked-inopenhandsuser while the host directory is owned by the host user. This was reported in OpenHands/OpenHands#14882 and confirmed as a docs gap.Summary
docker runcommand with--user "$(id -u):$(id -g)"so the mounted OpenHands config directory remains writable.Issue Number
References OpenHands/OpenHands#14882.
How to Test
git diff --check -- README.mdVideo/Screenshots
Docs-only change.
Type
Notes
Kept the existing macOS/Linux command unchanged and added the Linux-specific variant only for the rootful Docker Engine permission case.