I am a Docker newbie and currently replicating course videos. I have to add that I only have Windows 10 Home and I am hence limited to Docker Toolbox. (At work I have W 10 Pro and use Docker itself and didnt experience the problem I am about to report).
When I run the following in the Windows Power Shell:
PS C:\Program Files\Docker Toolbox> docker run -ti -h python -v ${pwd}:/root/docker -p 9999:9999 ubuntu:latest /bin/bash
I get the following error
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: invalid mode: /root/docker.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
The problem doesnt occur in the command prompt, so it seems to be related to the Power Shell. I did not find anything in discussion boards. Any input would be appreciated.
Best Markus
I got the same issue while using docker toolbox. Using one more '/' before your source path as well as before your target path will resolve this problem. In your case it will look like this:
docker run -ti -h python -v /${pwd}://root/docker -p 9999:9999 ubuntu:latest /bin/bash
if this doesn't work then try using absolute path with extra '/' like this:
docker run -ti -h python -v //c/path_to_application://root/docker -p 9999:9999 ubuntu:latest /bin/bash