瀏覽代碼

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]>
Lance Chen 3 年之前
父節點
當前提交
1191023fb6
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      pkg/compose/create.go

+ 1 - 0
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