gpt4 book ai didi

centos - docker exec -it 返回 "cannot enable tty mode on non tty input"

转载 作者:IT老高 更新时间:2023-10-28 12:34:19 32 4
gpt4 key购买 nike

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

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

我在 centos box 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

关于centos - docker exec -it 返回 "cannot enable tty mode on non tty input",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29380344/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com