I've recently started learning about Docker and I'm having trouble locating where it stores images on my hard drive. The documentation mentions that the default location is /var/lib/docker/overlay2 (or just overlay), but I can't find that folder in /var/lib/docker. After reinstalling Docker and deleting the /var/lib/docker folder, it still recognizes my old images, so I think they must be stored somewhere else. Any insights?
3 Answers
You can also run `docker volume inspect`. It will show you the location for any volumes, which might help you track down your images.
Just a heads up, Docker now defaults to using containerd for image storage, so you might want to check in /var/lib/containerd for your images.
Which method did you use to install Docker? Also, could you share the content of your daemon.json configuration file? I heard it can sometimes affect where Docker stores its data.

I just used "pacman -S docker", added myself to the docker group, and enabled docker.service. There’s now a daemon.json file in /etc/docker, but I don’t think it created any defaults.