Ver Fonte

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 há 3 anos atrás
pai
commit
1191023fb6
1 ficheiros alterados com 1 adições e 0 exclusões
  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