久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

用dockerfile完成tomcat以及java的war包自動(dòng)部署

 李濟(jì)宏 2023-09-04 發(fā)布于上海

1,,下載jdk和tomcat

wget https://dlcdn./tomcat/tomcat-8/v8.5.93/bin/apache-tomcat-8.5.93.tar.gz

wget https://repo./java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz 


2,,vim Dockerfile

FROM centos:latest     
MAINTAINER Amadeus
# now add java and tomcat support in the container
ADD jdk-8u202-linux-x64.tar.gz /usr/local/                  
ADD apache-tomcat-8.5.93.tar.gz /usr/local/

# configuration of java and tomcat ENV
ENV JAVA_HOME /usr/local/jdk1.8.0_202
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /usr/local/apache-tomcat-8.5.93
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME/lib:$CATALINA_HOME/bin

# container listener port
EXPOSE 8080
# startup web application services by self
CMD /usr/local/apache-tomcat-8.5.93/bin/catalina.sh run

3,,build docker鏡像

docker build -t ureport2 .


4. docker run ,映射本地war包路徑和logs日志

docker run --name ureport -d -p 8080:8080 -v /home/ureport/logs:/usr/local/apache-tomcat-8.5.93/logs -v /home/ureport/www:/usr/local/apache-tomcat-8.5.93/webapps --privileged=true ureport2


5. 關(guān)閉防火墻

service firewalld stop


6.如果出現(xiàn)docker network錯(cuò)誤,,執(zhí)行:

?systemctl restart docker

    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請遵守用戶 評(píng)論公約

    類似文章 更多