Skip to content

Commit 1191023

Browse files
lancechentwndeloof
authored andcommitted
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 <[email protected]>
1 parent a108690 commit 1191023

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/compose/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
380380
Isolation: container.Isolation(service.Isolation),
381381
Runtime: service.Runtime,
382382
LogConfig: logConfig,
383+
GroupAdd: service.GroupAdd,
383384
}
384385

385386
return &containerConfig, &hostConfig, networkConfig, nil

0 commit comments

Comments
 (0)