FROM tomcat:latest
MAINTAINER this is tomcat image
ADD apache-tomcat-10.1.11.tar.gz /usr/local/
ADD jdk-20_linux-x64_bin.tar.gz /usr/local/
ADD jre-8u381-linux-x64.tar.gz /usr/local/jdk-20.0.2/
ENV JAVA_HOME /usr/local/jdk-20.0.2/
ENV CATALINA_HOME /usr/local/apache-tomcat-10.1.11/
ENV PATH PATH:PATH:PATH:JAVA_HOME/bin:$CATALINA_HOME/bin
EXPOSE 8080
CMD ["/usr/local/apache-tomcat-10.1.11/bin/catalina.sh",“run”]
docker build -t tomcat -f /root/dockerfile/tomcat .
nginx dockerfile
FROM nginx:1.20.1
copy nginx /etc/nginx/nginx.conf
copy index.html /usr/share/nginx/html/index.html
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 80docker build -t nginx -f /home/centos/dockerfile/nginx .
阅读(330) | 评论(0) | 转发(0) |