termios.error: (25, 'Inappropriate ioctl for device')

termios.error: (25, ‘Inappropriate ioctl for device’)

运行docker容器时出错
(base) tarena@tedu:~/PredW$ sudo docker run -d -p 8080:8080 w_trend:latest
705774aa32790e6412432ee297f0ffdfa60c856c9322a34ea4950e3db157fb0e
(base) tarena@tedu:~/PredW$ sudo docker logs 705774aa3279
报错
Using TensorFlow backend.
/usr/local/lib/python3.7/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
password:Traceback (most recent call last):
  File "/usr/local/lib/python3.7/getpass.py", line 69, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (25, 'Inappropriate ioctl for device')
根据问题描述,应该是我文件中涉及到交互,改变启动模式即可
(base) tarena@tedu:~/PredW$ sudo docker run -it -p 8080:8080 w_trend:latest

指令说明:

 docker run 运行一个容器
 
 -t 标志, 在新容器中分配一个终端

 -i 标志,允许和容器的标准输入有一个交互性的连接

 -d daemon方式,守护态运行

 /bin/bash 在容器内部发起一个 Bash shell

 -p:把容器的8000端口映射到宿主机6500

 -v:主机的目录/home/code/webtest映射到容器的目录/code

 --name:给容器起个名字web,webtest是我们刚刚构建的镜像

 --restart:always 容器退出时总是重启

 --privileged=true:执行容器内文件需要的权限
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值