mirror of https://github.com/docker/docs.git
Force inspect for containers in Restarting state.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
This commit is contained in:
parent
fc1d6a2f1d
commit
b61dfa7497
|
@ -640,6 +640,11 @@ func (e *Engine) updateContainer(c dockerclient.Container, containers map[string
|
|||
if current, exists := e.containers[c.Id]; exists {
|
||||
// The container is already known.
|
||||
container = current
|
||||
// Restarting is a transit state. Unfortunately Docker doesn't always emit
|
||||
// events when it gets out of Restarting state. Force an inspect to update.
|
||||
if container.Info.State != nil && container.Info.State.Restarting {
|
||||
full = true
|
||||
}
|
||||
} else {
|
||||
// This is a brand new container. We need to do a full refresh.
|
||||
container = &Container{
|
||||
|
|
Loading…
Reference in New Issue