mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
only stop dependent containers ... if there's some
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
8e497a1289
commit
6b3e57503e
@ -226,6 +226,9 @@ func (c *convergence) ensureService(ctx context.Context, project *types.Project,
|
||||
func (c *convergence) stopDependentContainers(ctx context.Context, project *types.Project, service types.ServiceConfig) error {
|
||||
// Stop dependent containers, so they will be restarted after service is re-created
|
||||
dependents := project.GetDependentsForService(service)
|
||||
if len(dependents) == 0 {
|
||||
return nil
|
||||
}
|
||||
err := c.service.stop(ctx, project.Name, api.StopOptions{
|
||||
Services: dependents,
|
||||
Project: project,
|
||||
|
Loading…
x
Reference in New Issue
Block a user