1

I'm using Windows-10 and using GitBash entering in the command

$ docker run -ti ubuntu:latest bash

And it gives me this error message "the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'"

And so I placed in this command to switch to winpty $ winpty docker.exe run -it --rm ubuntu:14.04 /bin/bash And it still doesn't work. I know my ports are running correctly, and I installed ubuntu correctly.

tripleee
  • 175,061
  • 34
  • 275
  • 318
Monttana16
  • 307
  • 2
  • 9
  • I'd also like to add that I'm fallowing a tutorial where the instructor is using git in macOS, I don't know if the command line is specific to the OS but I believe the commands he's using is universal. – Monttana16 Nov 02 '21 at 10:01
  • 1
    You're conflating Git (a version control system) with a bash (a command line interpreter / "shell"). Git-bash is a *port* of bash to Windows; Git needs a POSIX-compatible shell, so the Windows version of Git comes with this port. It's not part *of* Git though. I've updated your tags but you might want to add more Windows tags. – torek Nov 02 '21 at 10:13
  • Okay, so if I wanted to run that command using a windows OS, it would be better to just use Powershell or standard CommanLine ? – Monttana16 Nov 02 '21 at 10:31
  • 1
    Maybe. Bash is nice for doing shell programming, but doesn't really "play well" with Windows in general. Some large parts of Git used to be bash scripts; the Git project folks have gradually been turning these into other languages so that they'll run fast on Windows. – torek Nov 02 '21 at 10:45
  • 1
    Does this answer your question? [Docker and git bash: the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'](https://stackoverflow.com/questions/51782815/docker-and-git-bash-the-input-device-is-not-a-tty-if-you-are-using-mintty-try) – tripleee Nov 02 '21 at 10:51

1 Answers1

2

At windows 10 and git bash this works for me:

winpty docker exec -it "CONTAINTER ID" sh