jenkins-compose.yml
* 更改国内插件源
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
version: '3'
services:
jenkins:
user: root
restart: always
image: jenkins/jenkins:lts-jdk17
hostname: jenkins
privileged: true
container_name: jenkins
networks:
- test
ports:
- 8082:8080
- 50000:50000
environment:
TZ: Asia/Shanghai
volumes:
- ./jenkins_home:/var/jenkins_home
- ./apache-maven-3.6.3:/usr/local/maven
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
logging:
options:
max-size: "512M"
max-file: "1"
healthcheck:
test: ["CMD","curl","-s","-f","http://localhost:50000"]
interval: 30s
timeout: 10s
retries: 10
networks:
test: