diff --git a/cmd/dockerd/daemon.go b/cmd/dockerd/daemon.go index f61246d5c6..2d9f0b8b3e 100644 --- a/cmd/dockerd/daemon.go +++ b/cmd/dockerd/daemon.go @@ -164,6 +164,7 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) { if cli.Config.ContainerdAddr == "" && runtime.GOOS != "windows" { systemContainerdAddr, ok, err := systemContainerdRunning(cli.Config.IsRootless()) if err != nil { + cancel() return errors.Wrap(err, "could not determine whether the system containerd is running") } if !ok {