As Hyper-V and VirtualBox conflict with each other (https://github.com/solo-io/unik/issues/166), I have to use Docker Toolbox instead of Docker for Windows in order to use the VirtualBox provider.
But Docker Toolbox doesn't support Windows-style path when mounting a volume to the container. See details in: https://github.com/docker/toolbox/issues/777. For Unik's case, the unik daemon command fails as follows:
This error is because -v C:\Users\luo\AppData\Local\Temp\vbox.instancelistener.110230039:/opt/code is not recognized by Docker Toolbox. But -v /c/Users/luo/AppData/Local/Temp/vbox.instancelistener.110230039:/opt/code works. I don't think Docker will fix this issue very in a near future, because They already mark Docker Toolbox as deprecated and their Git repo has been inactive for more than half a year. So I prefer a fix at the application side (aka Unik).
As Hyper-V and VirtualBox conflict with each other (https://github.com/solo-io/unik/issues/166), I have to use
Docker Toolbox
instead ofDocker for Windows
in order to use the VirtualBox provider.But
Docker Toolbox
doesn't support Windows-style path when mounting a volume to the container. See details in: https://github.com/docker/toolbox/issues/777. For Unik's case, theunik daemon
command fails as follows:This error is because
-v C:\Users\luo\AppData\Local\Temp\vbox.instancelistener.110230039:/opt/code
is not recognized byDocker Toolbox
. But-v /c/Users/luo/AppData/Local/Temp/vbox.instancelistener.110230039:/opt/code
works. I don't think Docker will fix this issue very in a near future, because They already markDocker Toolbox
as deprecated and their Git repo has been inactive for more than half a year. So I prefer a fix at the application side (aka Unik).My solution is:
Docker Toolbox
orDocker for Windows
. Here's a post that provides a way: https://stackoverflow.com/questions/43242218/how-can-a-script-distinguish-docker-toolbox-and-docker-for-windowsDocker for Windows
is running, then do nothing.Docker Toolbox
is running, then perform a translation on the mount path of thedocker run
call, translate paths likeC:\xxx
to/c/xxx
.Does it sound OK? If it's OK, I will make a PR.