Search code examples
dockerboot2docker

Boot2Docker starting Ubuntu image


I am trying to get the latest Ubuntu image going om my Windows 7/Boot2Docker machine but when i try to start the image i get an error message.

exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/Program Files (x86)/Git/bin/bash: no such file or directory

Full errormessage:

$ docker run -t -i ubuntu /bin/bash
exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/Program Files (x86)/Git/bin/bash: no such file or directory
FATA[0000] Error response from daemon: Cannot start container 100e77a5ac95f8fb8dc55e6382e7a8cd6f946ec807e90d9efdb6fc905a046569: [8] System error: exec: "C:/Program Files (x86)/Git/bin/bash": stat C:/P
rogram Files (x86)/Git/bin/bash: no such file or directory

Any clue on how to work around this? Another image like the default Jenkins one works ok!

The Ubuntu image is pulled correctly

Running Ubuntu image after SSH:

docker@boot2docker:~$ docker run ubuntu
docker@boot2docker:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS

Solution

  • It means that somehow your $PATH (within the boot2docker session) includes "C:/Program Files (x86)/Git/bin/" before /bin.

    Check the $PATH you have when running docker run --rm -it ubuntu:latest.

    The fact that you manage to run the image in a boot2docker ssh session, but docker ps displays nothing seems expected.

    Only a docker run --rm -it ubuntu would display a shell.
    A simplt docker run would exit the shell immadiatly (non-interactive run), and the container would be in status 'Exited' (see docker ps -a output)