docker in Mount tomcat, web deployment project

Mount directory failed;

So using a docker cp way, but before you removed the ROOT under webapps, and deploy the war package rename ROOT.war to be successful;

The following mount succeeded:

失败的:docker run -d -p 8089:8080 -v /data/mytomcat/webapps:/usr/local/tomcat/webapps --name mytomcat tomcat:8.5

成功的:docker run -d -p 8089:8080 --name mytomcat  -v /data/mytomcat/webapps:/usr/local/tomcat/webapps --restart=always tomcat 

Analysis: failure and success of two variables: the name of the war package, as well as --restart = always

  The main thing is that after the failure of the war deployment package, and then use docker restart mytomcat command, it may not take effect;

 

Guess you like

Origin www.cnblogs.com/notchangeworld/p/11345304.html