docker-compose部署tomcat
步骤:1、创建相应目录2、编写compose文件3、运行1、mkdir -p /opt/tomcat/{conf,webapps,logs}2、vim /opt/tomcat/tomcat-compose.ymlversion: '3'services:tomcat:image: tomcat:8.5.60-jdk8-adoptopenjdk-hotspotcontainer_name: tomc
·
步骤:
1、创建相应目录
2、编写compose文件
3、运行
1、mkdir -p /opt/tomcat/{conf,webapps,logs}
2、vim /opt/tomcat/tomcat-compose.yml
version: '3'
services:
tomcat:
image: tomcat:8.5.60-jdk8-adoptopenjdk-hotspot
container_name: tomcat1
restart: always
ports:
- 8081:8080
environment:
TZ: "Asia/Shanghai"
volumes:
- /opt/tomcat1/conf/server.xml:/usr/local/tomcat/server.xml
- /opt/tomcat1/webapps:/usr/local/tomcat/webapps
- /opt/tomcat1/logs:/usr/local/tomcat/logs
3、cd /opt/tomcat && docker-compose -f tomcat-compose.yml up -d
更多推荐
已为社区贡献3条内容
所有评论(0)