沙滩星空的博客沙滩星空的博客

windows下进不了docker容器问题

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:/#

https://www.cnblogs.com/lwmp/p/6999742.html

未经允许不得转载:沙滩星空的博客 » windows下进不了docker容器问题

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址