mirror of
https://github.com/docker/compose.git
synced 2025-07-27 07:34:10 +02:00
Fix orphans warning when running docker compose up SERVICE
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
5ddcc84a3d
commit
c8b708a20b
@ -73,7 +73,12 @@ func (s *composeService) Create(ctx context.Context, project *types.Project, opt
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
orphans := observedState.filter(isNotService(project.ServiceNames()...))
|
allServices := project.AllServices()
|
||||||
|
allServiceNames := []string{}
|
||||||
|
for _, service := range allServices {
|
||||||
|
allServiceNames = append(allServiceNames, service.Name)
|
||||||
|
}
|
||||||
|
orphans := observedState.filter(isNotService(allServiceNames...))
|
||||||
if len(orphans) > 0 {
|
if len(orphans) > 0 {
|
||||||
if opts.RemoveOrphans {
|
if opts.RemoveOrphans {
|
||||||
w := progress.ContextWriter(ctx)
|
w := progress.ContextWriter(ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user