If you are using mintty, try prefixing the command with 'winpty' code example
Example: the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
winpty docker run -it ubuntu
winpty docker run -it ubuntu