only expose API socket to service asking for it

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2025-06-24 17:07:11 +02:00 committed by Guillaume Lours
parent 3394bf031b
commit 6514c680a5

View File

@ -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,