I installed DockerDesktop to WIN10 and Ubuntu1804 from Store.
But when I run docker run -it -v pwd:/build ubuntu bash
I cannot see my host volume in the /build, please see below picture:
Anyone know how to fix this issue ? Any clue is appreciate.
a) A command that works everywhere (in PowerShell too) is ... -v "$(pwd):/build" ...
b) Only paths under /c/ā¦ are mounted to the Docker VM and can be mounted to a container. Click on āSettingsā on the Docker symbol in the taskbar and go to ResourcesāFILE SHARING to see which drives are available.
(I assume you installed the stable version and not a tech preview.)
Thank you all. @rrpnarola san, the container image āubuntuā is pull from dock hub, I didnāt change anything yet. @tekki san, please see below picture, it still cannot mount linux host volume.
Thatās, as I said in b), because you try to mount a folder under /home. ābuildā should be placed somewhere in /c.
Thatās how it looks in my WSL Debian:
$ mount
...
C:\ on /c type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off)
E:\ on /e type drvfs (rw,noatime,uid=1000,gid=1000,metadata,case=off)
C: and E: are the Windows drives mounted into WSL. My Docker settings are the following:
C: and E: are connected from Windows to the Docker VM and everything inside them can be mounted into a container. From WSL only paths starting with /c and /e are available to Docker.