Docker Community Forums

Share and learn in the Docker community.

Where did all of my Images and Containers Go?

I have been using Docker community edition for about I year now and I think I have good working knowledge of how to use it.

I have created a long list of images and containers which I have been using along with learning Docker.

I have saved many of them.

I used them over the weekend. I occasionally modify them and change them as Ii need to do so.

Yesterday , on Sunday afternoon I started up Docker as usual and gace the command

Docker images

I got nothing! So I tried the other command

Docker ps -a

and again got nothing. What is going on. Everything is gone. I must have dozens of images and containers and now I have nothing.

I am not sure where they reside on my Laptop’s hard drive. I know that I must start of Docker to use see and use them.

But What the heck happened.

Where do the images and containers reside - on my hard drive?

In order for to do this I would have had to del each images and then each containers one by one. That would have taken hours.

In order to o and ensemble delete (which I rarely do) to do it twice once for images and once for containers.

I know that did not do that. They were just gone when I started up Docker yesterday. It seems I must have done something wrong.

Bu what?

I even tried looking through directories on my hard drive and there was nothing.

What happened?

As I said I have backed up the critical ones, but I do not want this to happen again.

What did happen?

Any help appreciated. Thanks in advance.

Respectfully,

1479natalia

Did you by any change something in /etc/docker/daemon.json or mount a different filesystem in /var/lib/docker (or in one of the sub or parent folders?)

if you changed the daemon.json, please share the content of the file.

Is this a Linux laptop or are you running Docker Desktop on Windows?

The default Docker images and Docker files location depends on your operating system:
Ubuntu: /var/lib/docker/
Fedora: /var/lib/docker/
Debian: /var/lib/docker/
Windows: C:\ProgramData\DockerDesktop
MacOS: ~/Library/Containers/com.docker.docker/Data/vms/0/

What OS and version are you using on the system and post the version in your response?
Are you using the same user ID as before, if not that is your issue?
Test to see if docker is running and post the version in your response? docker version
Test to see if you can download and run hello-world, docker run hello-world
The location of ‘Docker Root Dir:’ can be found in the output of the command, docker info, and post the location in your response.
Did you start using dockerd userns-remap (–userns-remap=default) for docker security?

If this is true then a new secure docker directory has been created with a different user ID and docker does not move your images into the new Docker directory.  You have to move your images.

Check to see if you mounted a file system on top of the ‘Docker Root Dir’. That will do it every time.