Open alecl opened 8 years ago
In case anyone else is searching far and wide as I was for a solution to spaces in volume paths on Windows, try using quotes around the entire -v
argument. That is, docker run -v "C:\path with spaces\:/mnt/path with spaces"
and not around the individual paths. Escaping spaces with batch file-specific ^
(or \
) does not work.
I am only using docker machine because the machine I was testing on doesn't support the SLAT extensions to use Hyper-V and docker for windows.
There's some serious gaps still to having a usable environment on Windows many in place for months. They are related to spaces in paths, path translation, and TTY detection. It's whack a mole to do something that should be simple like mounting a volume to a docker container. Attempts using git bash (w/ and w/o winpty) and then powershell each met with intractable issues eventually.
Will it continue being updated with Windows fixes or is it going to be deprecated? If not deprecated someone should take a serious look at getting a workable experience for Powershell and Git Bash.
Everything Docker works great on my Mac and I never imagined how painful the Windows experience ended up being. Had this been my first Docker experience on Windows rather than on Mac, I would have had a terrible view of the productivity potential of Docker on desktops.
A collection of workarounds and issues that help with the issues but only so far:
https://github.com/docker/machine/issues/3152 http://stackoverflow.com/a/36563820 http://stackoverflow.com/a/37551919 (this fixes bash but since I also need winpty to get an interactive session it doesn't chain to fix that) https://github.com/docker/docker/issues/18756