centos – docker exec -it返回“不能在非tty输入启用tty模式”

前端之家收集整理的这篇文章主要介绍了centos – docker exec -it返回“不能在非tty输入启用tty模式”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
docker exec -it命令返回以下错误“无法在非tty输入上启用tty模式”
level="fatal" msg="cannot enable tty mode on non tty input"

我在centos框6.6上运行docker(1.4.1)。
我试图执行以下命令
docker exec -it containerName / bin / bash
但我得到以下错误

level="fatal" msg="cannot enable tty mode on non tty input"
运行docker exec -i而不是docker exec -it修复我的问题。事实上,我的剧本是由CRONTAB发起的,这不是一个终端。

提醒一句:

Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]

Run a command in a running container

  -i,--interactive=false    Keep STDIN open even if not attached  
  -t,--tty=false            Allocate a pseudo-TTY
原文链接:https://www.f2er.com/centos/376229.html

猜你在找的CentOS相关文章