Skip to content

Propagate GroupAdd from ServiceConfig to HostConfig#8987

Merged
ndeloof merged 1 commit intodocker:v2from
lancechentw:support-groupadd-in-compose-v2
Dec 17, 2021
Merged

Propagate GroupAdd from ServiceConfig to HostConfig#8987
ndeloof merged 1 commit intodocker:v2from
lancechentw:support-groupadd-in-compose-v2

Conversation

@lancechentw
Copy link
Contributor

What I did
The group_add key is parsed correctly from a compose file, but it is not
passed into the ContainerCreate API call, thus the configuration does
not take effect. This commit fixes the issue by propagating the
configuration from Docker compose's ServiceConfig to Docker container's
HostConfig.

Related issue
I think #8810 was not completely fixed when it was closed. The PR compose-spec/compose-go#201 that was considered the fix to #8810 only solved the first half part of the issue, which is parsing group_add correctly, this PR solves the other half.

The `group_add` key is parsed correctly from a compose file, but it is not
passed into the `ContainerCreate` API call, thus the configuration does
not take effect. This commit fixes the issue by propagating the
configuration from Docker compose's ServiceConfig to Docker container's
HostConfig.

Signed-off-by: Lance Chen <hello@lancechen.tw>
@ndeloof ndeloof merged commit 1191023 into docker:v2 Dec 17, 2021
@ndeloof
Copy link
Contributor

ndeloof commented Dec 17, 2021

nice, thanks

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.

2 participants