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 ability to update internal group ids #19

Closed
Tzrlk opened this issue Apr 2, 2019 · 4 comments
Closed

Add ability to update internal group ids #19

Tzrlk opened this issue Apr 2, 2019 · 4 comments

Comments

@Tzrlk
Copy link

Tzrlk commented Apr 2, 2019

I have a problem with my current use of fixuid, in that the docker socket I'm binding from the host has a different gid than the internal docker group. Consequently, adding the internal user to the "docker" group has no effect.

It'd be awesome if internal group gids could be remapped to account for this by either:

  • Specifying an environment variable:
docker run -dt -u 123:123 -e FIXGID_DOCKER=984 ...
  • Testing specific paths defined in the config:
...
groups:
  docker: /var/run/docker.sock
@polarathene
Copy link

Consequently, adding the internal user to the "docker" group has no effect.

? Shouldn't you be mapping the GID?(to the socket) I haven't used fixuid in this situation, but I'd assume it's not meant to have an ability to adjust the socket GID outside of the container, is there any reason that -u 123:984 would not work? On the host you could add your user to that group as it sounds rather host specific.

@Tzrlk
Copy link
Author

Tzrlk commented Nov 19, 2019

This was a while ago, but I think I was asking to alter the internal docker user group id? Changing the socket id is indeed not a great idea.

@polarathene
Copy link

@Tzrlk I don't think that would work. If you're bind mounting something into the container, changing the UID/GID on either host or container side would affect the other wouldn't? Assign your user the GID within the container(they can have multiple groups), or pass it in via the --user flag(additional GID can be given with --group-add).

@caleblloyd
Copy link
Collaborator

Yes, I believe @polarathene solution is the best here - use --group-add and add the host docker GID

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

3 participants