解决不能自启动dockerfile tomcat的问题

FROM centos:7
MAINTAINER Mr.gao
ENV JAVA_HOME /usr/local/jdk
ENV JRE_HOME ${JAVA_HOME}/jre
ENV CLASSPATH .:${JAVA_HOME}/lib/tools.jar:${JRE_HOME}/lib/dt.jar
ENV PATH ${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:$PATH

ADD jdk-8u152-linux-x64.tar.gz /usr/local
RUN ln -s /usr/local/jdk1.8.0_152 /usr/local/jdk

EXPOSE 9030 

COPY exec-entrypoint.sh /
RUN chmod +x /exec-entrypoint.sh
CMD ["sh","/exec-entrypoint.sh"]

 

!#/bin/bash
java -jar /home/dataexa/insight/jar/*.jar | tee /home/dataexa/insight/log/nohup.out

 

#!/bin/bash
#因为直接输入startup.sh会退出所以必须让启动命令卡在前台

/usr/local/tomcat/bin/startup.sh

while :
do
sleep 300
done

你可能感兴趣的:(解决不能自启动dockerfile tomcat的问题)