Using absolute path with docker run command not working

For anyone still having this problem with Docker-for-Windows, here are the 2 solutions that work:

Prefix your command

with MSYS_NO_PATHCONV=1

In full: MSYS_NO_PATHCONV=1 docker run -v /c/path:/path

Use double-slashes

// at the beginning

In full: docker run -v //c/path:/path


Source: https://github.com/moby/moby/issues/24029#issuecomment-250412919


To close the subject. Here is the solution ;) docker toolbox mount file on windows

Also, the interpolation of $HOME by docker on windows have to be compatible with it, so it should transform it by himself when you call it in docker command.

Tags:

Docker