Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker - run error on window git bash for -v

error pic

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:

error path

like image 764
Y.elinx Avatar asked Sep 04 '17 02:09

Y.elinx


1 Answers

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
like image 174
VonC Avatar answered Sep 19 '22 03:09

VonC