mirror of https://github.com/docker/compose.git
attach _only_ to services declared by project applying profiles
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
7e3564b7ad
commit
8d03e29994
|
@ -185,6 +185,9 @@ func runUp(ctx context.Context, backend api.Service, createOptions createOptions
|
|||
if upOptions.attachDependencies {
|
||||
attachTo = project.ServiceNames()
|
||||
}
|
||||
if len(attachTo) == 0 {
|
||||
attachTo = project.ServiceNames()
|
||||
}
|
||||
|
||||
create := api.CreateOptions{
|
||||
Services: services,
|
||||
|
|
|
@ -61,12 +61,12 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
|
|||
go func() {
|
||||
<-signalChan
|
||||
s.Kill(ctx, project.Name, api.KillOptions{ // nolint:errcheck
|
||||
Services: options.Create.Services,
|
||||
Services: project.ServiceNames(),
|
||||
})
|
||||
}()
|
||||
|
||||
return s.Stop(ctx, project.Name, api.StopOptions{
|
||||
Services: options.Create.Services,
|
||||
Services: project.ServiceNames(),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue