java8的dockerfile
FROM centos:7
ADD jdk8.tar /usr/local/
ENV JAVA_HOME=/usr/local/jdk8
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib
CMD ["java","-version"]
tomcat8的dockerfile tomcat8.tar包含站点目录的ROOT.war包
FROM centos:7
ADD jdk8.tar /usr/local/
ENV JAVA_HOME=/usr/local/jdk8
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib
ADD tomcat8.tar /usr/local/
CMD ["/usr/local/tomcat8/bin/catalina.sh","run"]