docker-compose.yml
yml
networks:
1panel-network:
external: true
services:
jenkins:
container_name: jenkins
environment:
- JENKINS_UC="https://mirrors.tuna.tsinghua.edu.cn/jenkins/"
- JENKINS_UC_DOWNLOAD="https://mirrors.tuna.tsinghua.edu.cn/jenkins/"
- JENKINS_OPTS="-Dhudson.model.UpdateCenter.updateCenterUrl=https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json"
image: jenkins/jenkins:2.541.3-lts
labels:
createdBy: Apps
networks:
- 1panel-network
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 8080:8080
privileged: true
restart: always
user: root
volumes:
- ./data:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/libexec/docker/cli-plugins:/usr/libexec/docker/cli-plugins
- /usr/bin/docker:/usr/bin/docker