-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
group_add doesn't work in version 3 #4700
Comments
Also, I'd like to note the example for
A service name isn't specified. |
Thanks for the report! This is actually a documentation issue and should be reported there. |
I just want some clarification, but is |
@Agrosis Yes, |
@shin The way you played with time in that sentence leaves me confused still. Is there some 3.x version where it does or will work? Is there any version? Is there a reason why this works in version 2 but not 3? |
@moble as the documentation indicates, |
Thanks for the clarification. |
Does anyone have a good workaround for this perhaps please? I can downgrade some things to version 2 but that doesn't feel great! |
I ended up adding a |
@moble hmm but if you add the group during build it does not match the host group id and hence is of no use... What can I do about this :( |
@axel1200 I'm guessing that you're referring to the fact that the mapping between user/group name and user/group id number is not necessarily the same on the host and in the container. So, for example, if you First, simply assign the desired numbers to the user or group when you're creating them in the container, with the
with Second, you could just run commands within the container as whatever weird user/group already has the same uid and gid as the ones you need on your host. This is trickier but can be handy for one-off uses. Third, there's the somewhat heavier-duty solution of userns-remap, which is docker's real solution to this problem. |
Since 1.27.0, version 2.x and version 3.x schema are merged. So group_add is supported with 1.27.0+ docker-compose for all v2, v3 versions. |
I don't think this is a real solution. This only applies to docker compose, not docker swarm. |
group_add
in the Docker Compose reference file is supposed to work on version 3 according to https://docs.docker.com/compose/compose-file/#groupadd, but when I have the following config:I get the following error:
NOTE:
group_add
works fine when I specify version 2.1.Version Info:
The text was updated successfully, but these errors were encountered: