菜鳥一個,我是試著用docker做容器,就是把apr編譯安裝,並且載入到tomcat裡去,卻怎麼也不行。一直報libtool找不到,以下是我的腳本
ROM centos:6.6
MAINTAINER linx
#安装arp
#安装autoconf libtool openssl
RUN yum -y install autoconf automake libtool openssl openssl-devel
RUN autoreconf --force --install
RUN libtoolize --automake --force
RUN automake --force --add-missing
ADD apr-1.5.2.tar.gz /usr/local/
RUN mkdir /usr/apr
RUN /usr/local/apr-1.5.2/configure --prefix=/usr/apr
WORKDIR /usr/local/apr-1.5.2/
RUN pwd
RUN make
RUN make install
#把java与tomcat添加到容器中
ADD jdk_1.7.0_79.tar.gz /usr/local/
ADD apache-tomcat-7.0.67.tar.gz /usr/local/
#安装配置tomcat-native
ADD tomcat-native.tar.gz /usr/local/tomcat-native/
WORKDIR /usr/local/tomcat-native/tomcat-native-1.1.33-src/jni/native/
RUN ./configure --with-apr=/usr/apr --with-java-home=/usr/local/java --with-ssl=/usr/bin
RUN make && make install
#配置java与tomcat环境变量 apr
ENV JAVA_HOME /usr/local/java
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /usr/local/apache-tomcat-7.0.67
ENV CATALINA_BASE /usr/local/apache-tomcat-7.0.67
#容器运行时监听的端口
EXPOSE 8080
CMD ["catalina.sh", "run"]
求大神指教
建議先跑一個有互動的容器,一步步的執行一下編譯安裝的過程,如果手動執行的過程都過不了,那直接生成鏡像怎麼跑的通?