feat:环境部署 by 小傅哥

This commit is contained in:
小傅哥
2024-01-16 21:28:35 +08:00
parent f87fbee8c1
commit e2b8f7ce44
2 changed files with 295 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
version: '3.8'
# 执行脚本docker-compose -f docker-compose-v1.0.yml up -d
# 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: