-
Notifications
You must be signed in to change notification settings - Fork 37
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
Merge fixdockergid with fixuid #29
Comments
We could consider adding another configuration option, such as:
The following rules would apply:
|
Actually, ensuring the group name is
If the group within the container is not named docker, the This use case matters because this is how Jenkins handle pipelines running inside of containers. |
Does fix of #30 actually address this issue as well? |
I think this could be achieved by adding the GID of the group, computed on the host like this:
There may be no named group that matches inside the container, but the container will have access to the socket on the host |
Yes, this works. But not for the use case I mentioned... Jenkins. There, I can pass a list of arguments that should be added to the Maybe: # /etc/fixuid.yml
secondaryGroups:
- name: docker
gidFromPath: /var/run/docker.sock
ensureGroupName: true |
If |
Not to mention that we still need the basic functionality of ensuring secondary groups as proposed by @caleblloyd: secondaryGroups:
- name: docker
gidFromPath: /var/run/docker.sock BTW, I added some tests in |
I made fixdockergid to prove that #19 is a valid use case.
However, it would be so cool to have this functionality in
fixuid
instead, so we would not have to deal with this twice.fixdockergid
depends onfixuid
being installed.This problem happens when you mount the
docker.sock
from the host machine on the container, and you try to access it using a non-root user. Then, thedocker
group id on the host can mismatch with thedocker
group id from the container, thus causing the non-root users to receive permission denied errors when trying to run docker commands. Microsoft solved it by usingsocat
: https://github.com/microsoft/vscode-dev-containers/tree/master/containers/docker-from-docker#enabling-non-root-access-to-docker-in-the-containerBut I consider this approach much better, less intrusive, and less expensive.
The text was updated successfully, but these errors were encountered: