Since I prefer using bash (and use git anyway), I tried running docker run -it ubuntu bash
(after a successful hello-world
), which unfortunately resulted in a invalid handle
error. Using cmd.exe
instead, it works fine.
Asked
Active
Viewed 1,537 times
0

Tobias Kienzler
- 25,759
- 22
- 127
- 221
-
Related: https://github.com/docker/toolbox/issues/231, https://forums.docker.com/t/what-happened-to-winpty-functionality-in-bash-git-bash-on-windows/8774 – Tobias Kienzler Feb 21 '17 at 11:50
-
Neither mintty nor winpty are required to run Docker in ConEmu. – Maximus Feb 21 '17 at 16:16
-
@Maximus Indeed, and when I simply used msys2's `bash.exe`, it directly worked (aside from a path conversion issue when using volumes). There _was_ some other problem with a messed up `PS1` plus UTF-8 which originally made me use `mintty`, but I didn't reencounter that anymore. And _awesome_ work you did with ConEmu :) – Tobias Kienzler Feb 21 '17 at 19:25
1 Answers
1
Turns out the problem is my using ConEmu to host mintty.exe
. Using mingw64.exe
(or mintty.exe
) directly instead, the error reads
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
instead and provides the helpful information to prefix winpty
, which then also works from within ConEmu. Note however that winpty
also messes up your command line parameters, e.g. winpty echo yes /no
yields yes C:/yourmsyspath/no
...

Tobias Kienzler
- 25,759
- 22
- 127
- 221