Force inspect for containers in Restarting state.

Signed-off-by: Dong Chen <dongluo.chen@docker.com>
This commit is contained in:
Dong Chen 2016-03-16 18:10:59 -07:00
parent fc1d6a2f1d
commit b61dfa7497
1 changed files with 5 additions and 0 deletions

View File

@ -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{