Skip to content

Commit 5aed704

Browse files
ndeloofglours
authored andcommitted
only check attached networks on running containers
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 1ff9b75 commit 5aed704

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/compose/convergence.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func (c *convergence) mustRecreate(expected types.ServiceConfig, actual moby.Con
337337
return true, nil
338338
}
339339

340-
if c.networks != nil {
340+
if c.networks != nil && actual.State == "running" {
341341
// check the networks container is connected to are the expected ones
342342
for net := range expected.Networks {
343343
id := c.networks[net]

0 commit comments

Comments
 (0)