Browse Source

only expose API socket to service asking for it

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 5 months ago
parent
commit
6514c680a5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pkg/compose/apiSocket.go

+ 3 - 0
pkg/compose/apiSocket.go

@@ -64,6 +64,9 @@ func (s *composeService) useAPISocket(project *types.Project) (*types.Project, e
 	}
 
 	for name, service := range project.Services {
+		if !service.UseAPISocket {
+			continue
+		}
 		service.Volumes = append(service.Volumes, types.ServiceVolumeConfig{
 			Type:   types.VolumeTypeBind,
 			Source: socket,