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 Docker on Windows 8 in MINGW64.
A pseudo terminal (also known as a tty or a pts ) connects a user's “terminal” with the stdin and stdout stream, commonly (but not necessarily) through a shell such as bash . … In the case of docker, you'll often use -t and -i together when you run processes in interactive mode, such as when starting a bash shell.
If you are using mintty, try prefixing the command with 'winpty' Bookmark this question.
In the default daemon configuration on Windows, the docker client must be run elevated to connect . This error may also indicate that the docker daemon is not running. 3) If you reopen cmd or powershell, you should repeat the related steps again.
Running Commands in an Alternate Directory in a Docker Container. To run a command in a certain directory of your container, use the --workdir flag to specify the directory: docker exec --workdir /tmp container-name pwd.
docker error : the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' [duplicate] Closed 1 year ago. 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 Docker on Windows 8 in MINGW64.
In this post I will try to help you fix error like “The input device is not a TTY”. This error will occur if you are trying to run docker container using -it option, which means that you want to run docker container for interactive processes (like a shell).
If you don't need either, e.g. running your command inside of a Jenkins or cron script, you should do this. Or you can change it to -i if you have input piped into the docker command that doesn't come from a TTY. If you have something like xyz | docker ... or docker ... <input in your command line, do this.
It's not redundant, docker can create a TTY without attaching anything to it. Your output would have characters for color, etc, but your terminal output would not be piped into the input of the container. So the characters you type would be queued up for the next command you run after the docker command exits.
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
If you are using Git Bash you can try like this
winpty docker run -it ubuntu
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With