构建Docker映像时无法写入'/ dev / tty'

编程入门 行业动态 更新时间:2024-10-11 09:22:00
本文介绍了构建Docker映像时无法写入'/ dev / tty'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在从Dockerfile构建docker映像,当我运行一个脚本(CUDA安装脚本)时,

I'm building docker images from Dockerfile and when I run a script(CUDA installation script) which has

echo XXX > /dev/tty

,然后出现错误 / dev / tty:没有这样的设备或地址,构建失败。 我尝试了--silent标志,但似乎没有帮助。

in it, then an error "/dev/tty: No such device or address" comes up and the build failed. I've tried --silent flag but it seems do no help.

我的基本映像是Cent OS 7。

My base image is Cent OS 7.

反正有没有解决或解决此问题的方法?

Is there anyway to fix or work around this?

推荐答案

我已经解决了这个问题:原来我没有安装命令tar& Perl在手。 并且脚本想要将错误消息写入/ dev / tty。 错误信息使我找到了解决此问题的错误方法。

I've fixed this problem: it turns out I didn't install command tar & perl before hand. And the script wants to write error messages to /dev/tty. The error information led me to the wrong way to solve this issue.

谢谢。

更多推荐

构建Docker映像时无法写入'/ dev / tty'

本文发布于:2023-10-27 04:27:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532312.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:映像   Docker   tty   dev

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!