tomcat

version: '3'
services:
  tomcat:
    user: root
    restart: always
    container_name: tomcat
    image: docker.io/tomcat:latest
    privileged: true
    logging:
      options:
        max-size: "50M"
        max-file: "1"
    environment:
      - TZ="Asia/Shanghai"
    ports:
      - 8088:8080
    volumes:
      - ./webapps:/usr/local/tomcat/webapps/
      - conf:/usr/local/tomcat/conf
      - logs:/usr/local/tomcat/logs
      - /etc/localtime:/etc/localtime
    healthcheck:
      test: ["CMD-SHELL", "curl -sS 'http://localhost:8088' || exit 1"]
      interval: 1m
      timeout: 10s
      retries: 20
volumes:
  conf:
  logs:

你可能感兴趣的:(docker相关记录随笔,1024程序员节)