我刚接触过码头,所以我可能做错了,但是我试图通过一个像这样的Dockerfile安装Dockerfile:
FROM rhel7:latest
RUN cd /tmp
RUN "wget", "http://www.us.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz"
RUN tar xzf apache-tomcat-6.0.44.tar.gz
RUN mv apache-tomcat-6.0.44 /usr/local/tomcat6
RUN cd /usr/local/tomcat6
Run ./bin/start.sh它在第3行失败,原因是:
RUN "wget", "http://www.us.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz"当我运行码头建设时,我得到了这个:

我在用:
提前感谢您的帮助。
发布于 2015-08-07 11:24:59
有错误的图像的解决方案是在wget CMD RUN yum -y install wget之前添加
如果您这样编写它,结果是相同的,只是不同的执行:
RUN wget http://www.us.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz不要在RUN命令中使用引号和逗号。
发布于 2015-08-14 06:36:18
从shell命令中退出代码127意味着“未找到命令”。因此,在您的例子中,在Docker运行时,似乎找不到引号中的"wget“。
在某些情况下,安装wget的命令(或任何缺少的命令行工具)必须首先在Dockerfile中运行,因为一些基本的Docker映像将没有wget。您可以在失败的命令之前添加一行,如下所示:
RUN yum install -y wget发布于 2018-02-24 17:45:11
不要忘记,您可以在同一行中添加所需的所有lib和包。
RUN cd /tmp \
&& apt-get update \
&& apt-get install -y curl apt-utils wget unzip\
&& rm -rf /var/lib/apt/lists/*
https://stackoverflow.com/questions/31876031
复制相似问题