diff --git a/components/engine/daemon/daemon.go b/components/engine/daemon/daemon.go index ace5df8ab5..efe7b0942a 100644 --- a/components/engine/daemon/daemon.go +++ b/components/engine/daemon/daemon.go @@ -201,7 +201,9 @@ func (daemon *Daemon) restore() error { restartContainers[c] = make(chan struct{}) mapLock.Unlock() } else if c.HostConfig != nil && c.HostConfig.AutoRemove { + mapLock.Lock() removeContainers[c.ID] = c + mapLock.Unlock() } }