mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
only expose API socket to service asking for it
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
3394bf031b
commit
6514c680a5
@ -64,6 +64,9 @@ func (s *composeService) useAPISocket(project *types.Project) (*types.Project, e
|
|||||||
}
|
}
|
||||||
|
|
||||||
for name, service := range project.Services {
|
for name, service := range project.Services {
|
||||||
|
if !service.UseAPISocket {
|
||||||
|
continue
|
||||||
|
}
|
||||||
service.Volumes = append(service.Volumes, types.ServiceVolumeConfig{
|
service.Volumes = append(service.Volumes, types.ServiceVolumeConfig{
|
||||||
Type: types.VolumeTypeBind,
|
Type: types.VolumeTypeBind,
|
||||||
Source: socket,
|
Source: socket,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user