Docker Community Forums

Share and learn in the Docker community.

Can't mount a volume in windows


(Danielcaldwell) #1

Expected behavior

If I use -v in the docker command, I expect it to mount my volume.

Actual behavior

I get a directory, but it is empty. The files in the directory are not copied over.

Information

  • the output of:

    • Moby Notification > Diagose & Feedback on Windows
      I don’t see a diagnose and feedback option.
  • Operating System
    My OS is Windows 10 Pro x64

Steps to reproduce the behavior

This is the command list that I did:

 Directory of C:\Users\Daniel\Documents\Projects\2016.07.16_TileStacheDockerfile

07/17/2016  11:14 AM    <DIR>          .
07/17/2016  11:14 AM    <DIR>          ..
07/17/2016  11:14 AM               592 Dockerfile
07/17/2016  12:14 PM    <DIR>          tilestache_config_files
               1 File(s)            592 bytes
               3 Dir(s)  154,697,560,064 bytes free

C:\Users\Daniel\Documents\Projects\2016.07.16_TileStacheDockerfile>dir tilestache_config_files
 Volume in drive C is Windows
 Volume Serial Number is 04FC-FF0D

 Directory of C:\Users\Daniel\Documents\Projects\2016.07.16_TileStacheDockerfile\tilestache_config_files

07/17/2016  12:14 PM    <DIR>          .
07/17/2016  12:14 PM    <DIR>          ..
07/17/2016  11:01 AM               242 open_street_map_proxy.tsconfig
07/17/2016  12:14 PM    <DIR>          test
               1 File(s)            242 bytes
               3 Dir(s)  154,697,515,008 bytes free

C:\Users\Daniel\Documents\Projects\2016.07.16_TileStacheDockerfile>docker run --rm -ti -v /c/Users/Daniel/Documents/Projects/2016.07.16_TileStacheDockerfile/tilestache_config_files:/srv/tilestache_config_files  ubuntu:14.04 /bin/bash
root@c4a61e10fc51:/# ls /srv/tilestache_config_files/
root@c4a61e10fc51:/# ls /srv/tilestache_config_files/ -la
total 4
drwxr-xr-x 2 root root   40 Jul 17 19:24 .
drwxr-xr-x 3 root root 4096 Jul 17 19:39 ..
root@c4a61e10fc51:/# exit
exit

C:\Users\Daniel\Documents\Projects\2016.07.16_TileStacheDockerfile>

Am I specifying the directory wrong? If I try C:, it errors. I tried upgrading to 11.2, but it didn’t work at all so I had to scrub docker from the computer and reinstall the older version. Any ideas? Thanks!


(Ailurarctos) #2

It looks like maybe the Docker VM does not have your C: mounted. Did you configure it in the “Shared Drives” page?


(Warawut Meesupa) #3

I’m also stuck with exactly the same problem. waiting for help.