docker error : the input device is not a TTY. If y

2019-02-09 00:33发布

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.

7条回答
时光不老,我们不散
2楼-- · 2019-02-09 01:05

you can try with Cmder tool it will work. Its not working with Gitbash

查看更多
唯我独甜
3楼-- · 2019-02-09 01:06

This problem occurs when running with -it option using bash terminal on windows. You can use Powershell to resolve this issue.

查看更多
贪生不怕死
4楼-- · 2019-02-09 01:09

It may be that you're not running your commands within the Docker terminal. If you don't, you may not be properly connected to the Docker daemon and won't be able to interact correctly.

Make sure you're running commands in the actual Docker Terminal.

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-02-09 01:12

In addition to above mentioned solutions. In case you are getting this error for docker attach

example: docker attach alpine1

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

Solution: Adding winpty before docker command i.e. winpty docker attach should work.

example: winpty docker attach alpine1

Note: I was getting this error while using base on windows and this solution worked for me.

查看更多
forever°为你锁心
6楼-- · 2019-02-09 01:21

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
查看更多
一夜七次
7楼-- · 2019-02-09 01:27

Remove -it from the command. If you want to keep it interactive then keep -i

查看更多
登录 后发表回答