请在Chrome、Firefox、IE8+等现代浏览器浏览本站。 本博客所有文章为原创,图片不加水印,随意转载,但请注明来源,谢谢!

the input device is not a TTY. If you are using mintty, try prefixing the command with ‘winpty’ 解决方案

随笔 kxjhwbb 6782℃ 0评论

Windows下使用Docker,直接使用cmd进容器不会有这个提示

但是你可能会想用git的bash来进入,毕竟看起来更linux一点。。

进入的时候会提示:

the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'

如果你按照他的提示在前面加上winpty,会提示:

OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"C:/Program Files/Git/sh\": stat C:/Program Files/Git/sh: no such file or directory": unknown

个人猜测是因为最后一个参数被识别成了windows下的路径进行了转换操作。

解决方法也很简单,进容器的时候把/bin/sh或/bin/bash改成 sh 以及 bash,就可以了~

喜欢 (7)or分享 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

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