springmvc tomcat Dockerfile
vi Dockerfile
#基础镜像
FROM docker.io/centos:latest
#作者
MAINTAINER sunys
#安装解压工具
RUN yum install -y zip unzip
#将当前目录下的jdk复制到 镜像中
COPY ./jdk1.8.0_261 /usr/local/jdk
#将tomcat复制到镜像中
COPY ./apache-tomcat-8.5.57 /usr/local/tomcat
#配置环境变量
ENV JAVA_HOME /usr/local/jdk
ENV CLASSPATH .:$JAVA_HOME/lib
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $PATH:$JAVA_HOME/bin
#暴露端口
EXPOSE 8080
#启动脚本
CMD ["/usr/local/tomcat/bin/catalina.sh","run"]