构建Docker映像时无法写入'/ dev / tty' [英] Can not write to '/dev/tty' when build Docker images
问题描述
我正在从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'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!