Docker - run error on window git bash for -v

Add two slashes before bin/sh to turn off GitBash's automatic path conversion.

docker run --privileged=true -d --name=ubuntu14.04 -v e:/docker/data:/data ubuntu //bin/bash

or if you're trying to attach to a running container

docker attach -it ubuntu //bin/bash

winpty docker run -i -t test1 ./bin/sh

Will work on Windows OS.


If possible, try the same command in a regular DOS session, instead of a git bash.

That will avoid the git bash session to automatically resolve /bin/bash to C:/Program Files/Git/usr/bin/bash, which won't be known at all by the ubuntu container.

The OP confirms this is working, provided the following options are added:

--attach=STDIN 
--privileged=true