Browse Source

don't create from run command during dependencies creation process

Signed-off-by: Guillaume Lours <[email protected]>
Guillaume Lours 5 months ago
parent
commit
769b7391ba
1 changed files with 3 additions and 1 deletions
  1. 3 1
      pkg/compose/run.go

+ 3 - 1
pkg/compose/run.go

@@ -190,8 +190,10 @@ func (s *composeService) startDependencies(ctx context.Context, project *types.P
 		project.Services = dependencies
 		project.DisabledServices[options.Service] = requestedService
 	}
+	project.DisabledServices[options.Service] = requestedService
+	delete(project.Services, options.Service)
 
-	err := s.Create(ctx, project, api.CreateOptions{
+	err = s.Create(ctx, project, api.CreateOptions{
 		Build:         options.Build,
 		IgnoreOrphans: options.IgnoreOrphans,
 		RemoveOrphans: options.RemoveOrphans,