docker error on windows : the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’ [duplicate]

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 … Read more

What do pty and tty mean?

tty originally meant “teletype” and “pty” means “pseudo-teletype”. In UNIX, /dev/tty* is any device that acts like a “teletype”, i.e: a terminal. (Called teletype because that’s what we had for terminals in those benighted days.) A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, … Read more

PHP CLI: How to read a single character of input from the TTY (without waiting for the enter key)?

The solution for me was to set -icanon mode on the TTY (using stty). Eg.: stty -icanon So, the the code that now works is: #!/usr/bin/php <?php system(“stty -icanon”); echo “input# “; while ($c = fread(STDIN, 1)) { echo “Read from STDIN: ” . $c . “\ninput# “; } ?> Output: input# fRead from STDIN: … Read more