当前位置:首页 > Python > 正文内容

python执行docke命令报错:the input device is not a TTY

SuperSu10个月前 (07-25)Python4771

起因是使用 python 脚本执行 docke 命令

执行下面时:

python执行docke命令报错:the input device is not a TTY

docker exec -it laravel ls /home/123.txt

报错:

the input device is not a TTY

解决方法:

docker exec -i laravel ls /home/123.txt

(去掉 -t)

因为-t 是指创建一个伪终端,这里不需要创建伪终端

扫描二维码推送至手机访问。

版权声明:本文由SuperSu's Blog发布,如需转载请注明出处。

本文链接:https://blog.supersu.cc/post/3.html

分享给朋友:
返回列表

没有更早的文章了...

下一篇:Python获取macbook用户名

“python执行docke命令报错:the input device is not a TTY” 的相关文章

MacOS python2.7 安装M2Crypto报错error: command 'swig' failed with exit status 1

MacOS python2.7 安装M2Crypto报错error: command 'swig' failed with exit status 1

执行 pip install M2Crypto 命令时报错如下:error: command 'swig' failed with exit status 1解决方案:brew ins...

记一次客户端连接Docker容器 sshd 报错Permission denied, please try again.的问题

记一次客户端连接Docker容器 sshd 报错Permission denied, please try again.的问题

【背景】在一次需求中需要实现 Docker 启动 CentOS7.9,并在容器内安装 sshd 实现外部客户端可以访问。sshd 是打包好可直接运行的二进制文件,并且 sshd_config 也是提供的现成的,这也为后边出现问题做了铺垫。我这边首先是把 sshd 的二进制可执行文件拷贝到了/usr/...

评论列表

suyinchuo
suyinchuo IP:北京市
10个月前 (07-26)

瞧一瞧看一看嘞

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。