treat restarting containers as "not running"
thus preventing stale DNS & IPAM entries. Fixes #1977
This commit is contained in:
1 parent
5e761a62b0
commit
e52abafc48
1 file changed
+1
-1
@@ -97,7 +97,7 @@ func (c *Client) AddObserver(ob ContainerObserver) error {
|
||||
func (c *Client) IsContainerNotRunning(idStr string) bool {
|
||||
container, err := c.InspectContainer(idStr)
|
||||
if err == nil {
|
||||
return !container.State.Running
|
||||
return !container.State.Running || container.State.Restarting
|
||||
}
|
||||
if _, notThere := err.(*docker.NoSuchContainer); notThere {
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user