Reputation: 411
I run docker in my win10, but use -v
params has a error.
docker run --privileged=true -d --name=ubuntu14.04 -v e:/docker/data:/data ubuntu /bin/bash
error:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/bash\": stat C:/Program Files/Git/usr/bin/bash: no such file or directory".
When I ls this path just like error path pic:
Upvotes: 17
Views: 11052
Reputation: 2759
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
Upvotes: 14
Reputation: 467
winpty docker run -i -t test1 ./bin/sh
Will work on Windows OS.
Upvotes: 6
Reputation: 1323553
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
Upvotes: 12