I'm new to Docker and trying to wrap my head around where running containers actually store their data. I recently installed Docker Desktop on my Linux Mint system. I read that these files should be in /var/lib/docker and my inspection of the docker setup suggests the same thing. However, I can't find a docker folder at that path on my localhost, even though everything seems to be functioning properly. Can someone clarify where the data is stored?
2 Answers
Once you switch to Docker Engine, you’ll definitely see the docker folder in /var/lib. That’s indeed where containers keep their internal data structures. If you're using a bind mount like /local-host-folder:/data, the data will be stored in /var/lib/docker at the corresponding location on your system. As for accessing that directory, make sure you have the right permissions—it might be set to limit access, even for admin users.
You should avoid using Docker Desktop on Linux because it runs in a VM, which is unnecessary since you're already using Linux. Just install Docker Engine directly. That VM is why you can't find the /var/lib/docker path on your system—it's all inside the VM's filesystem.

Exactly! If you're having access issues, try checking your user permissions or adding yourself to the docker group to gain the necessary access.