docker exec -it返回“不能在非tty输入上启用tty模式” [英] docker exec -it returns "cannot enable tty mode on non tty input"

查看:4831
本文介绍了docker exec -it返回“不能在非tty输入上启用tty模式”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

docker exec -it 命令返回以下错误无法在非tty输入上启用tty模式

docker exec -it command returns following error "cannot enable tty mode on non tty input"

level="fatal" msg="cannot enable tty mode on non tty input" 


$ b b

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



I am running docker(1.4.1) on centos box 6.6. I am trying to execute the following command docker exec -it containerName /bin/bash but I am getting following error

level="fatal" msg="cannot enable tty mode on non tty input" 


推荐答案

执行 docker exec -i c $ c> docker exec -it 修复了我的问题。确实,我的脚本是由CRONTAB发起的,它不是一个终端。

Running docker exec -i instead of docker exec -it fixed my issue. Indeed, my script was launched by CRONTAB which isn't a terminal.

提醒:

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

这篇关于docker exec -it返回“不能在非tty输入上启用tty模式”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆