Propagate GroupAdd from ServiceConfig to HostConfig

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>
This commit is contained in:
Lance Chen 2021-12-03 14:31:10 +08:00 committed by Nicolas De loof
parent a108690ac2
commit 1191023fb6
1 changed files with 1 additions and 0 deletions

View File

@ -380,6 +380,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
Isolation: container.Isolation(service.Isolation),
Runtime: service.Runtime,
LogConfig: logConfig,
GroupAdd: service.GroupAdd,
}
return &containerConfig, &hostConfig, networkConfig, nil