diff --git a/daemon/daemon.go b/daemon/daemon.go index e1c2e50f0f2bc..6a0c4dbd7c622 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -8,6 +8,7 @@ package daemon // import "github.com/docker/docker/daemon" import ( "context" "fmt" + "io/fs" "net" "net/url" "os" @@ -204,11 +205,6 @@ func (daemon *Daemon) RegistryHosts() docker.RegistryHosts { } func (daemon *Daemon) restore(ctx context.Context) error { - // Restoring containers after a restart is not yet supported - // when using the containerd content store. - if daemon.UsesSnapshotter() { - return nil - } var mapLock sync.Mutex containers := make(map[string]*container.Container) @@ -219,6 +215,12 @@ func (daemon *Daemon) restore(ctx context.Context) error { return err } + // Restoring containers after a restart is not yet supported + // when using the containerd content store. + if daemon.UsesSnapshotter() { + dir = []fs.DirEntry{} + } + // parallelLimit is the maximum number of parallel startup jobs that we // allow (this is the limited used for all startup semaphores). The multipler // (128) was chosen after some fairly significant benchmarking -- don't change