Mounting local directory in docker container on Windows fails silently

I’m trying to mount a local windows directory as a volume in a docker container, but after mounting it I cannot see any of my local files in the container. Can anyone point out what I’m doing wrong?

First I run:

  • docker cp from host to container is not working
  • Dotnet Core publish to IIS from Mac
  • How to install Docker from the Source code?
  • zsh function to set docker environment on OSX
  • Docker link container - environment variables not being displayed
  • Docker containers shut down after systemd start
  • docker run -v /c/Users/myuser/documents/development:/home image/name`
    

    It executes without any error message. Then I run:

    docker run image/name ls /home
    

    And the files from inside C:/Users/myuser/Documents/development are not displayed. Am I making some wrong assumptions about how this should work? Is there an error in my commands?

    I’ve also discovered that if I use the -it flags the volume mounts successfully, but upon exiting the docker container the I see the volume is no longer mounted. This works: docker run -it -v /c/Users/myuser/documents/development:/home image/name

    Here are the last few lines from my docker.log:

    time="2016-06-20T19:32:41.843405613Z" level=debug msg="event unhandled: type:\"start-container\" id:\"210bdd5a0a0b13491f388b001bcb7a1add12a65706be7831f82c94d74424025d\" timestamp:1466451161 " 
    time="2016-06-20T19:32:41.844850367Z" level=debug msg="Calling POST /v1.23/containers/210bdd5a0a0b13491f388b001bcb7a1add12a65706be7831f82c94d74424025d/resize?h=24&w=111" 
    time="2016-06-20T19:32:42Z" level=debug msg="containerd: process exited" id=210bdd5a0a0b13491f388b001bcb7a1add12a65706be7831f82c94d74424025d pid=init status=0 systemPid=1773 
    time="2016-06-20T19:32:42.034419978Z" level=debug msg="received containerd event: &types.Event{Type:\"exit\", Id:\"210bdd5a0a0b13491f388b001bcb7a1add12a65706be7831f82c94d74424025d\", Status:0x0, Pid:\"init\", Timestamp:0x576844da}" 
    time="2016-06-20T19:32:42.036122814Z" level=debug msg="attach: stdout: end" 
    time="2016-06-20T19:32:42.036206299Z" level=debug msg="attach: stdin: end" 
    time="2016-06-20T19:32:42.036250871Z" level=debug msg="attach: stderr: end" 
    time="2016-06-20T19:32:42.036536700Z" level=debug msg="Closing buffered stdin pipe" 
    time="2016-06-20T19:32:42.045908932Z" level=debug msg="Calling GET /v1.23/containers/210bdd5a0a0b13491f388b001bcb7a1add12a65706be7831f82c94d74424025d/json" 
    time="2016-06-20T19:32:42.046328482Z" level=debug msg="Revoking external connectivity on endpoint pedantic_visvesvaraya (610b704780467ffa91695276c37bfc30d3e1c5b1a496ac2dda9021bcfdb6890c)" 
    time="2016-06-20T19:32:42.185521943Z" level=debug msg="Releasing addresses for endpoint pedantic_visvesvaraya's interface on network bridge" 
    time="2016-06-20T19:32:42.185699731Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)" 
    

  • How to build dockerfile
  • Docker - modifying IPTABLES for host from container
  • Kubernetes service-cluster-ip-range do not work for pod
  • Building a Docker image with deprecated dependencies
  • Drone local and local.properties
  • Cross-Host Communication: Ambassador pattern versus port exposition
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.