docker Windows v.19.03.13 / Windows 10 Pro v2004 (19041.508) clean install of both from scratch.
Everything seems to work fine, but I can’t figure out how to access the Windows file system. There is no file sharing tab in Docker Desktop Settings, as expected because WSL 2 is checked.
If I run a ubuntu container, the /mnt and /media directories are empty, and nothing relevant is shown by ‘mount’ as far as I can tell.
I’ve tried variations of -v and --mount with no success, typically I get errors like “Error response from daemon: invalid mount config for type “bin.source=e:” mount type unknown”.
Can someone provide or link to examples that show how to bind-mount, or otherwise access, Windows files from a container, showing how to deal with Windows specific issues such as drive letters and backslashes?
PS C:\Users\xy> is just the powershell prompt where xy is the username. The rest of it is the command you can run to test the mount. pwd is a command on Linux to get the current working directory on the host. On Windows it is an alias to “Get-Location”. Source: Windows PowerShell equivalent to Unix/Linux `pwd`? - Super User
Thank you! After I run this command I simply get into my container from terminal. How can I access the Windows file from it? Or, alternatively, how can I access the files in this container from Windows?