diff --git a/daemon/container.go b/daemon/container.go index 5b4143868..41a2d390e 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -1080,10 +1080,10 @@ func (container *Container) waitForStart() error { c.Close() } } + container.State.SetRunning(command.Pid()) if err := container.ToDisk(); err != nil { utils.Debugf("%s", err) } - container.State.SetRunning(command.Pid()) } // We use a callback here instead of a goroutine and an chan for