Docker Fix "cannot enable tty mode on non tty input"

Running docker on windows can be a bit challenging for newcomers. This is mainly because Docker was actually meant to run on Linux environments (LXC containers). One of the most common challenges among Windows users is to attach a TTY session to a docker container to run for example a bash shell.

Inherently, the Docker command tool for Windows, which is based on Cygwin/Mingw does not have TTY input, and the following error will pop up:

The workaround is to use winpty (which comes with Mingw):
alias docker="winpty docker"

No comments: