diff --git a/components/engine/daemon/container.go b/components/engine/daemon/container.go index 1efe511c85..7062d6796b 100644 --- a/components/engine/daemon/container.go +++ b/components/engine/daemon/container.go @@ -1104,10 +1104,10 @@ func (container *Container) waitForStart() error { c.Close() } } - if err := container.toDisk(); err != nil { + 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