Dockerfile Tomcat running in the foreground
If we use our commonly used startup.sh as the container startup script, the container will automatically shut down. At this time, Tomcat is running in the background, and there are no threads running in the foreground.
The Dockerfile file is added at the end
EXPOSE 8080
CMD ["catalina.sh", "run"]