Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for running as unprivileged user #11617

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

returnDanilo
Copy link
Contributor

Hey! I took the initiative of writing a bit of docs for the things I had to figure out myself. Plus, it was asked in #10047.

I think the docs could use a paragraph explaining the case of using cache mounts. But I've encountered the limits of my understanding of docker and uv.

Here's the problem I found when trying to document it:

--mount=type=cache leaves a root-owned directory after the RUN instruction has run; even when using the uid=.../gid=... options. I don't know if this is intended behavior or a bug.

This makes it so that you need to either (1) rmdir it before allowing the command in CMD ["uv", "run", "foobar.py"] to run, or (2) reset UV_CACHE_DIR to point to somewhere else.

Regardless of 1 or 2, the cache at "build" time becomes useless for the program at run time, and I don't know how important that is.

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.

1 participant