docker error : the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

Vipul Rao picture Vipul Rao · Feb 5, 2018 · Viewed 67.7k times · Source

After I run this
$ docker run --rm -v "/c/users/vipul rao/documents/github/wappalyzer:/opt/wappalyzer" -it wappalyzer/dev

I am getting the following error

the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

What should I use here? I am running on Windows 8 in MINGW64.

Answer

ErikMD picture ErikMD · Apr 22, 2018

As suggested by the error message you obtain, you should try to use winpty (which is installed by default with Git-Bash) and thus run:

winpty docker run --rm -v "/c/users/vipul rao/documents/github/wappalyzer:/opt/wappalyzer" -it wappalyzer/dev

If this works, you may want to set a Bash alias to avoid manually prepending winpty all the time:

echo "alias docker='winpty docker'" >> ~/.bashrc

or

echo "alias docker='winpty docker'" >> ~/.bash_profile