Skip to content

Commit

Permalink
only check attached networks on running containers
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof authored and glours committed Nov 27, 2024
1 parent 1ff9b75 commit 5aed704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/compose/convergence.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (c *convergence) mustRecreate(expected types.ServiceConfig, actual moby.Con
return true, nil
}

if c.networks != nil {
if c.networks != nil && actual.State == "running" {
// check the networks container is connected to are the expected ones
for net := range expected.Networks {
id := c.networks[net]
Expand Down

0 comments on commit 5aed704

Please sign in to comment.