services:
  jenkins:
    restart: always
    image: jenkins/jenkins:lts
    ports:
      - '8080:8080'
      - '50000:50000'
    privileged: true
    volumes:
      - ./data/:/var/jenkins_home
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/bin/docker:/usr/bin/docker
    environment:
      TZ: Asia/Shanghai
    extra_hosts:
      - "host.docker.internal:host-gateway"