Windows 下进入Docker容器时, 发生错误:
$ docker exec -it docker_cm_mysql57_1 /bin/bash
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
百度下,在命令前加 winpty ,但仍然没解决
$ winpty docker exec -it docker_cm_mysql57_1 /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"D:/Program Files/Git/usr/bin/bash.exe\": stat D:/Program Files/Git/
usr/bin/bash.exe: no such file or directory": unknown
/bin/bash 换成 bash 也不行
$ docker exec -it docker_cm_mysql57_1 bash
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
最后整合以上两种方法才行
$ winpty docker exec -it docker_cm_mysql57_1 bash
root@d088bc68ec7e:/#