Java – the Tomcat docker container stops and exists after stopping the Tomcat server

I am using docker container / image here After running the docker container, everything is normal But if I run / usr / local / Tomcat / bin #/ catalina. SH stop or / usr / local / Tomcat / bin #/ shutdown. SH, the running docker container will stop and exist

Why? How to change it?

thank you. Any comments are welcome

Solution

This is the definition, see https://github.com/docker-library/tomcat/blob/master/Dockerfile.template , where the latest line is CMD ["Catalina. Sh", "run"]

Once you manually stop Catalina, you cause the above CMD to terminate, so the container stops

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>