Where is the default Volume location

Hi,

This path resides on the Docker host VM (the Alpine Linux ran by xhyve).

You can use screen to jump in the host:

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty  
#user: root
#password: <none>
$ ls -ltrh /var/lib/docker/volumes
total 148
drwxr-xr-x    3 root     root          4096 May 16 13:20 04576d248c19b1210d47e94c8211493428cd3c3aa71dfe3fa0f4214589a6f875
drwxr-xr-x    3 root     root          4096 May 16 13:20 31af0f01492d8f7b832dad75e731b754302e84fbecfa7c654d7de10465bec204
drwxr-xr-x

Or you can also use gesellix trick from this thread to mount a directory from your Mac and the /var/lib/docker one from the VM to easily move files between the two:

docker run --rm -it -v /Users/<username>/volume-backup:/backup -v /var/lib/docker:/docker alpine:edge tar cfz /backup/volumes.tgz /docker/volumes/

HTH,
Alexandre

3 Likes