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

expose implicit UID and GID variables #572

Closed
wants to merge 1 commit into from

Conversation

ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Feb 13, 2024

A very common issue using compose is to bind mount local files into container, and get into permission issues. Until docker engine provides some uid+gid translation on bind mounts (maybe using bindfs?) the only option is to run container with same user as the owner of the bind-mounted file
This introduce support for UID and GID variables on systems this makes sense (i.e. everything but Windows) so one can set user: ${UID}:${GID} in a compose file.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Member

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find it right now but there has been a previous discussion about this - will look it up and link here later (on mobile right now)

I definitely get the desire to get the host UID/GID, particularly for bind mounts permissions, but I also am nervous about introducing something explicitly non-portable (and not even supported by all our platforms)

@ndeloof
Copy link
Collaborator Author

ndeloof commented Feb 16, 2024

Example request for such feature: docker/compose#4081 (comment)
I 100% agree not being totally confident with such a non-portable feature

@ndeloof
Copy link
Collaborator Author

ndeloof commented Apr 17, 2024

Let's close this one as lack of portability is challenging here

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.

None yet

2 participants