Lost all docker containers and images after upgrading docker

Viewed 9459

I upgraded my docker to 2.5.0.1 in windows after upgrading I lost all containers and images Is there any way to recover them? Why they lost?

4 Answers

You aren't alone. This seems to be a common occurrence with Docker. A very quick search reveals the following, which may be helpful:

This happened to me as well. I haven't used docker in several months, but I had several images locally. I went to use it today, and saw the same thing - all but one of my images in Linux, and one in Windows, are gone. I used to have nothing but good things to say about docker, but this is a cause for concern.

Update

I use Docker for Windows. I can find the original images if I modify Docker to use the legacy Hyper-V backend, rather than the WSL 2 based engine.

  • Open up Docker Desktop
  • Click on Settings
  • Uncheck "Use the WSL 2 based engine"
  • Click "Apply & Restart"

I found this setting after the OP mentioned disabling WSL completely on their system. The question now becomes how do we convert these images so that they are supported by the WSL 2 engine?

It could be that the docker root folder is changed. I had that issue

/lib/systemd/system/docker.service

This row will be overwritten:

ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --data-root /THISISGONE
Related