-
Notifications
You must be signed in to change notification settings - Fork 151
Description
I like to run my things from Bash on Windows, and mingw is a convenient way to do this. However, the dockercmd.sh script fails when used this way, with an error:
invalid mount config for type "bind": invalid mount path:
The reason for this is that mingw makes the results of pwd look unix-ey by converting the standard Windows C:\ into /c/ which, in turn, confuses Docker for Windows. The attached bash script fixes that using sed. It's not beautiful, but it works for me. I don't know if there is a reliable way to detect this issue and use the workaround automatically, but I thought I'd share it in the event that others have the problem.
I have to say, latex in Docker is fab - it has saved me a great deal of faffing around today!
I can't upload the script but I've made a gist and pasted the line below:
#!/bin/bash
docker run --rm -i --net=none -v "`pwd | sed -E 's/^\/(.)\//\1:\//'`":/data blang/latex "$@"
(I didn't seem to need the user stuff on Windows - and I'm not sure what the purpose is of the exec but that's probably just my ignorance...)