Files
dev-tech-jenkins/docs/dev-ops/docker-compose-v1.0.yml
2024-01-16 21:41:00 +08:00

26 lines
908 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
# 执行脚本docker-compose -f docker-compose-v1.0.yml up -d
# jdk1.8https://www.alipan.com/s/9TAdfkSY125
# https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
services:
jenkins:
image: jenkins/jenkins:2.439
container_name: jenkins
privileged: true
user: root
ports:
- "9090:8080"
- "50001:50000"
volumes:
- ./jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/local/bin/docker
- ./maven/conf/settings.xml:/usr/local/maven/conf/settings.xml
- /dev-ops/jdk/jdk1.8.0_202:/usr/local/jdk1.8.0_202
environment:
- JAVA_OPTS=-Djenkins.install.runSetupWizard=false # 禁止安装向导「如果需要密码则不要配置」docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
restart: unless-stopped
volumes:
jenkins_home: