Mount drives also in /mnt - compatibility with Bash on Ubuntu on Windows

Latest Windows 10 insider builds have support for a new integrated Ubuntu Bash on Windows.
I’m currently trying to get latest Docker 1.12 rc client binary to work with the docker daemon running in Docker for Windows Hyper-V VM.

First results are really promising: Running docker client is as easy as setting DOCKER_HOST variable to tcp://localhost:2375 und running the official binary from the github release page.

But there is a problem when trying to mount directories of exposed windows drives: Absolute path mapping is required as the mount directory of windows drives is slightly different in Bash for Windows compared to the MobyLinuxVM:

MobyLinux: /c and /C
Bash on Windows: /mnt/c

That’s why something like docker run -v .:/somedir <image> does not work/results in an empty volume.

Suggested enhancement: Mount/symlink drives shared in the Docker for Windows settings also to /mnt/<drive>

3 Likes

How did you install docker-client on ubuntu for windows? what cli commands did you use?

It’s been a while, but I remember to have installed docker from the official docker repositories for Ubuntu - see https://docs.docker.com/engine/installation/linux/ubuntulinux/.

Installing/configuring failed as the docker engine is not compatible with Ubuntu on Windows. So I disabled the service. e.g something like:

systemctl disable docker
export DOCKER_HOST=tcp://localhost:2375
docker run alpine echo "hello world"