I am trying to mount a Windows 10 directory into an Ubuntu container on docker. The path has spaces and a dash in the name:
C:\Users\eko\OneDrive - MyCo, Inc\_Git\covid19-maps
When I run the following in PowerShell:
docker run -i -v C:/Users/eko/OneDrive\ -\ MyCo,\ Inc/_Git/covid19:/home/covid19 ubuntu:latest
Docker fails with unknown shorthand flag: '\\' in -\
I also tried escaping the dash with a backslash like so /OneDrive\ \-\ MyCo,\ Inc/_Git
but that also fails.
Ok - not exactly an answer to the question, but having the git repo in OneDrive was redundant.
I moved it to a less problematic path and it worked.
docker run -i -v C:/_git/covid19:/home/git/covid19 ubuntu:latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With