- Create a named
docker-compose.yml
configuration files, configuration follows
version: '3.1'
services:
tomcat:
restart: always
image: tomcat
container_name: tomcat
ports:
- 8080:8080
volumes:
- ./webapps:/usr/local/tomcat/webapps.dist
environment:
TZ: Asia/Shanghai
- Start the container
docker-compose up -d
- Stop container
docker-compose down