Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where docker volumes are located?

Tags:

docker

macos

Need to know where docker volumes are located when using the docker machine on macOS. The installation is using boot2docker, so the VM works behind.

Example:

docker volume create test-data

docker inspect shows a path, but where can I find the specific (physical) location?

like image 372
frameworker Avatar asked Feb 26 '19 13:02

frameworker


People also ask

Where are docker volumes located in Windows?

ls -l /var/lib/docker/volumes/


1 Answers

It’s inside the virtual machine and isn’t directly accessible from the host.

Debug-level commands like docker volume inspect will give you a path, but they really are only for emergency debugging and not for routine use. If you have a way to get a shell in the VM you can see that path, but you really shouldn’t be directly accessing files there, and you shouldn’t be routinely docker inspecting anything.

like image 50
David Maze Avatar answered Oct 10 '22 16:10

David Maze