From 1191023fb6248f8d58188da30bc31b8b0b47ea17 Mon Sep 17 00:00:00 2001 From: Lance Chen Date: Fri, 3 Dec 2021 14:31:10 +0800 Subject: [PATCH] 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 --- pkg/compose/create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/compose/create.go b/pkg/compose/create.go index 64de699ba..2deed06ff 100644 --- a/pkg/compose/create.go +++ b/pkg/compose/create.go @@ -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