菜鸟一个,我是试着用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"]
求大神指教
建议先跑一个带交互的容器,一步步的执行一下编译安装的过程,如果手动执行的过程都过不了,那直接生成镜像怎么跑的通?