1

I executed the command:

winpty docker run -i -t ubuntu /bin/bash

And received the following error:

C:/Program Files/Docker/Docker/Resources/bin/docker.exe: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/bash.exe\": stat C:/Program Files/Git/usr/bin/bash.exe: no such file or directory".

Answer for @Rup:

enter image description here

Answer for @akop:

$ docker run -i -t ubuntu /bin/bash
the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'
kbqhzh
  • 43
  • 7
  • 1
    Does "C:/Program Files/Git/usr/bin/bash.exe" exist? – Rup Jan 14 '20 at 13:31
  • @Rup yes. i answered above – kbqhzh Jan 14 '20 at 13:37
  • Try running this command in powershell ... https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty As @akop pointed out you are running bash inside the container. You don't need bash on your local machine – Yan Jan 14 '20 at 14:19
  • 1
    @Yan yes. Are you right! My command running in windows powershell – kbqhzh Jan 14 '20 at 14:32
  • Does this answer your question? [Error "The input device is not a TTY"](https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty) – Yan Jan 14 '20 at 14:35

2 Answers2

0

C:/Program Files/Git/usr/bin/bash.exe does not exists on your host machine. (Note the /usr/bin/ part). That is causing your exception.

But it's not important what your host machine has. You want Docker to execute the /bin/bash of the given image. I don't know what winpty is, but a quick web search shows that there many problems with interactive shells and winpty.

You can try it without winpty.

Maybe need winpty some quotes. Like this winpty "docker run -i -t ubuntu /bin/bash"

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
akop
  • 5,981
  • 6
  • 24
  • 51
0

I encountered this error in Linux and turn out to be permission issue. The problem is gone after granting permission.

Terry Lam
  • 1,025
  • 1
  • 12
  • 13