Docker Community Forums

Share and learn in the Docker community.

Access to persistent volumes

Expected behavior

I am testing a docker-for-azure with a cluster of 1 manager and 2 workers.

I was trying the cat_vs_dogs example in http://blog.terranillius.com/post/composev3_swarm/, it works ok, but when I want to access to persistent volumes I can’t found the path in filesystem where they are supposed to be mounted. For example

    "Mountpoint": "/var/lib/docker/volumes/container-logs/_data",

How do we can access to /var/lib/docker from the shell container where we are placed when we do ssh to manager/host node? Is accessible somehow, the whole filesystem of the node, from the shell container?

Finally I could access to volumes in host thanks to this response in “Docker for Mac” forum

Basically mount vm root in a folder inside a new container:

docker run --rm -it -v /:/vm-root alpine:edge sh
2 Likes