Home:ALL Converter>Docker client on Windows Subsystem for Linux (Ubuntu) mounts (near) empty directory

Docker client on Windows Subsystem for Linux (Ubuntu) mounts (near) empty directory

Ask Time:2018-03-31T19:44:38         Author:DrTarr

Json Formatter

I have Windows 10 with Windows Subsystem for Linux installed (Bash on Ubuntu on Windows), have Docker installed on Windows, and a Docker client running on the linux subsystem per this walkthrough. All works well, however, when I want to be able to access a volume on my default mount "/mnt/c/../". I am using the mount flags at docker launch and have tried both:

docker run -v $PWD:/mount
docker run --mount type=bind,source="$(PWD)",target=/mount

and most variations shown here.

I have reason to think this is a permissions issue. When launching from the linux subsystem, there is always one empty folder from the original source directory. When launching from windows powershell, everything is fine. The only difference between the two would be the docker client being used.

I have shared C in the docker host settings in windows, however, do I need to do something similar for the client inside of windows subsystem for linux?

Versions:

Docker client: Docker version 18.03.0-ce, build 0520e24
Docker host: Docker version 18.03.0-ce-win59 (16762)

Author:DrTarr,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/49587377/docker-client-on-windows-subsystem-for-linux-ubuntu-mounts-near-empty-direct
yy