-
Notifications
You must be signed in to change notification settings - Fork 243
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
fix: file ownership of files copied into the container #2006
Conversation
Use `docker cp -a` to copy files in/out of the container. This requires to create the container with `--user` for the command not to fail.
Related issues in docker: There's also the fact that when using an image not specifying a user, it does not fallback to root as it should (hence the added For the
Even if doing this, docker might fix the reversed behavior of Given all that I'm not sure whether or not we should just reverse to using |
Thanks for pulling these options together. I meant to check the permissions thing with the It's crazy to me that Regarding adding
I'm very confused by this... according to the documentation by Docker:
By my reading, this paragraph contradicts itself "copied recursively with permissions preserved if possible" versus "Ownership is set to the user and primary group at the destination". So yes, this does seem like it's not set in stone. Having said that, I can't imagine they would change the de facto behaviour because it would break so many workflows. More likely, they'll fix the documentation. |
I definitely think, regardless of how we get there, that files in the container should be owned by the primary user, and once copied out of the container they should be owned by the user running cibuildwheel. I'm slightly torn on these options, right now, given the strangeness of the |
I also think that going back to the tar pipes setup we had before is what we should do for now. |
fix file ownership of files copied into the container
Use
docker cp -a
to copy files into the container.This requires to create the container with
--user
for the command not to fail.fix #2004
based on #2005