Containers and images disappeared

My containers and images are no longer listed. I had been using Docker Desktop without any trouble for about a month and today when I booted up my laptop, my containers and images are gone. I don’t see them in Docker Desktop or at the command line…

$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
$ docker images
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE

The output for wsl says docker-desktop is stopped, though I have the GUI open.

C:\Users\myname>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2

Docker version: 20.10.23
Docker Desktop version: 4.17.0

The docker client must be connected to a running docker engine, otherwise you would have received an error message.

Please share the outputs of following commands:

  • docker context ls
  • docker info
  • docker version
>docker context ls
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                               KUBERNETES ENDPOINT   ORCHESTRATOR
default *           moby                Current DOCKER_HOST based configuration   npipe:////./pipe/docker_engine                                      swarm
desktop-windows     moby                                                          npipe:////./pipe/dockerDesktopWindowsEngine
>docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.10.3)
  compose: Docker Compose (Docker Inc., v2.15.1)
  dev: Docker Dev Environments (Docker Inc., v0.1.0)
  extension: Manages Docker extensions (Docker Inc., v0.2.18)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.25.0)
  scout: Command line tool for Docker Scout (Docker Inc., v0.6.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.23
 Storage Driver: windowsfilter
  Windows:
 Logging Driver: json-file
 Plugins:
  Volume: local
  Network: ics internal l2bridge l2tunnel nat null overlay private transparent
  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
 Swarm: inactive
 Default Isolation: hyperv
 Kernel Version: 10.0 19045 (19041.1.amd64fre.vb_release.191206-1406)
 Operating System: Windows 10 Pro Version 2009 (OS Build 19045.2604)
 OSType: windows
 Architecture: x86_64
 CPUs: 16
 Total Memory: 15.2GiB
 Name: AEM-H0L3DK3
 ID: LAW3:OLBZ:66XF:5D2J:MJOE:7CF6:CTOO:7V42:FCHT:WARD:FNXX:TDJP
 Docker Root Dir: C:\ProgramData\Docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
>docker version
Client:
 Cloud integration: v1.0.31
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.18.10
 Git commit:        7155243
 Built:             Thu Jan 19 17:43:10 2023
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.17.0 (99724)
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.18.10
  Git commit:       6051f14
  Built:            Thu Jan 19 17:37:54 2023
  OS/Arch:          windows/amd64
  Experimental:     false

Looks like your Docker Desktop is configured to run Windows containers.
Did you use Windows containers before and now they are missing? If this is the case: I have no idea as I never used Windows containers.

Though, if you used Linux containers before. Then should be fixed by “Switch to Linux containers…” from the context menu of the Docker taskbar icon.

I don’t know what the original issue was, but I went ahead and uninstalled then re-installed Docker Desktop. It works fine now. This doesn’t restore the containers I lost, but I had no important work in my containers.