Docker版本1.0.1,构建990021a
我试图在via dockerfile中运行以下命令并看到错误
FROM centos:6
MAINTAINER averma <some@somemail.com>
RUN yum -y install wget svn
WORKDIR /usr/local/src
RUN rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
RUN wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
RUN rpm -Uhv rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
RUN yum -y install java-1.6.0-openjdk.x86_64
RUN mkdir -p /u001/tomcat-apps/
ENV PATH /u001/tomcat-apps
RUN chown root:root /etc/bootstrap.sh
RUN chmod 700 /etc/bootstrap.sh
CMD ["/etc/bootstrap.sh", "-d"]
EXPOSE 8280
错误:
Step 13 : RUN chown root:root /etc/bootstrap.sh
---> Running in a48ef57822bd
/bin/sh: chown: command not found
我使用了相同的文件并且工作正常。我的基础容器是官方centos6.6
答案 0 :(得分:0)
您已经通过设置:
打破了路径ENV PATH /u001/tomcat-apps
因此容器找不到任何二进制文件,包括chown
。我想你的意思是:
ENV PATH $PATH:/u001/tomcat-apps