Docker Tomcat 容器配置详解
This is a YAML file that describes a Docker container running Tomcat, a popular Java application server. The file specifies several configuration options for the container, including the image to use, the ports to expose, the volumes to mount, and the environment variables to set.
The container is named 'tomcat' and will always restart if it fails. It uses the Tomcat 9 image with JDK 8 installed, and logs in JSON format with a maximum file size of 2 MB and a maximum of 10 log files.
The container is built from the current directory using the C.UTF-8 locale. It exposes two ports, 6688 and 8009, and sets the timezone to Asia/Shanghai. It mounts several volumes, including the webapps and logs directories, as well as font and library directories.
The container is linked to a MySQL database container named 'mysql' with an alias of 'm1', and uses the default network.
原文地址: https://www.cveoy.top/t/topic/lxbN 著作权归作者所有。请勿转载和采集!