Open rwb27 opened 6 years ago
Thanks for sharing your solution. I don't have windows available for tests, but i'm sure someone might have the same issue to investigate this further.
no worries - after a little more reading I suspect I might be able to put something together that uses the results of uname -s
to tell whether it's running in mingw, and execute one line or the other accordingly. I'm happy to try to put that in a pull request if it's helpful - but given that you don't have a system to test it on, perhaps it's best just to leave this workaround in a (closed?) issue...
I think an additional script like dockercmd_mingw.sh
would be sufficient. I'll keep this open in case anyone wants to collaborate and verify the workaround
sure. I updated https://gist.github.com/rwb27/9074ac87cac705eb70d390447690b25f to switch automatically, but I agree a separate script might be easier.
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 ofpwd
look unix-ey by converting the standard WindowsC:\
into/c/
which, in turn, confuses Docker for Windows. The attached bash script fixes that usingsed
. 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:
(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...)