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

Permission problems on Linux #3

Open
Klavionik opened this issue Jun 2, 2024 · 0 comments
Open

Permission problems on Linux #3

Klavionik opened this issue Jun 2, 2024 · 0 comments

Comments

@Klavionik
Copy link

Hey there! Thanks for the image, for some reason tox don't want to discover some Python versions on my machine. The image saved my day.

However, I believe there's a problem when running this image on Linux hosts.

On Mac, the example command simply works out of the box, because Docker on Mac does some GID/UID reassigning magic (I didn't research too much about it) when mounting files from the host filesystem into a container.

On Linux hosts, this doesn't happen. An attempt to run this image will result in PermissionError: [Errno 13] Permission denied: '/tests/.tox/.pkg/file.lock' or something like that, because the /tests directory and all its content will belong to the host user, and container user won't have any permissions in this directory.

At least this is how the situation looks on my end. I solved it by changing the container user with -u 1000 flag. Maybe this should be mentioned in the docs. Maybe there's a better approach. Anyway, I wanted to share this with anyone who might get into this trouble.

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

No branches or pull requests

1 participant