mirror of https://github.com/docker/docs.git
Merge pull request #1985 from dongluochen/RefreshContainerAtTransitState
Force inspect for containers in Restarting state
This commit is contained in:
commit
73179d4dd8
|
|
@ -640,6 +640,11 @@ func (e *Engine) updateContainer(c dockerclient.Container, containers map[string
|
||||||
if current, exists := e.containers[c.Id]; exists {
|
if current, exists := e.containers[c.Id]; exists {
|
||||||
// The container is already known.
|
// The container is already known.
|
||||||
container = current
|
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 {
|
} else {
|
||||||
// This is a brand new container. We need to do a full refresh.
|
// This is a brand new container. We need to do a full refresh.
|
||||||
container = &Container{
|
container = &Container{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue