Docker Community Forums

Share and learn in the Docker community.

Mounting host directory

Hi

I am new Docker learner with a basic question hopefully you could help to solve and understand the problem which I have engaged with for couple of days.

I am using Windows 10 and Docker 1.12.5.

In the docs.docker is mentioned how to mount a host directory as a data volume
https://docs.docker.com/engine/tutorials/dockervolumes/#/mount-a-host-directory-as-a-data-volume
and it is explicitly explained on Windows machines we have to address the path as:
docker run -v c:<path>:/c:<container path>
BUT it seems it does not work, instead I address the path:
docker run -v /c/Users/my-account:container-path

Are these paths the same?

The second question which is very very important for me is, when I mount a directory from host machine (Windows 10) it works perfectly, I can access to the folder, modify and etc… but when I do not specify the complete path like “/src/webapp” in docs.docker example (the same link above) where and how can I access to the “webapp” folder? Is this a default path to docker engine (MobyLinuxVM)? In general, is it possible to access to the “Root Dir: /var/lib/docker”

I appreciate any help since it is very challenging problem for me.

Please see these docs for details on volume mounting with Docker for Windows: https://docs.docker.com/docker-for-windows/#/shared-drives