主pipe没有启动

我正在关注cloudera cdh4安装指南。

我的基本文件

FROM ubuntu:precise RUN apt-get update -y #RUN apt-get install -y curl RUN apt-get install -y software-properties-common python-software-properties RUN add-apt-repository ppa:webupd8team/java RUN apt-get update -y RUN echo debconf shared/accepted-oracle-license-v1-1 select true | \ debconf-set-selections RUN apt-get install -y oracle-java7-installer #Checking java version RUN java -version 

我的hadoop安装文件

java_ubuntu是从我的基本文件构build的图像。

 FROM java_ubuntu:latest RUN apt-get update -y RUN apt-get install -y curl RUN curl http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb > cdh4-repository_1.0_all.deb RUN dpkg -i cdh4-repository_1.0_all.deb RUN curl -s http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh/archive.key | apt-key add - RUN apt-get update -y RUN apt-get install -y hadoop-0.20-conf-pseudo #Check for /etc/hadoop/conf.pseudo.mrl to verfiy hadoop packages RUN echo "dhis" RUN dpkg -L hadoop-0.20-conf-pseudo 

主pipe部分hadoop_ubuntu是从我的hadoop安装docker文件构build的映像

 FROM hadoop_ubuntu:latest USER hdfs RUN hdfs namenode -format USER root RUN apt-get install -y supervisor RUN echo "[supervisord] nodameon=true [program=namenode] command=/etc/init.d/hadoop-hdfs-namenode -D" > /etc/supervisorconf.d CMD ["/usr/bin/supervisord"] 

程序成功构build。 但是namenode没有启动? 如何使用主pipe?

你在/etc/supervisorconf.d有你的configuration,我不认为这是正确的位置。

它应该是/etc/supervisor/conf.d/supervisord.conf

另外,如果您在本地创build文件,然后使用COPY指令将其放入图像,则更容易维护。

然后,正如有人提到你可以在运行后连接到容器( docker exec -it <container id> /bin/bash ),然后运行supervisorctl来查看正在运行的以及可能是错误的。

也许你需要在你的supervisor.conf中换行。 尝试手工制作一个复制到您的dockerfile进行testing。

Docker和supervisord