参考
https://hub.docker.com/_/jenkins?tab=description
https://hub.docker.com/r/jenkins/jenkins/tags
https://github.com/jenkinsci/docker/blob/master/README.md
启动 jenkins
docker-compose 内容
tee docker-compose.yaml <<-'EOF'
version: '3.3'
services:
jenkins:
restart: always
image: jenkins/jenkins:2.244-jdk11
#image: jenkins/jenkins:2.245-alpine
#image: jenkins/jenkins:2.235.2-lts-centos7
user: root
volumes:
- /docker-data/jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /usr/bin/docker-compose:/usr/bin/docker-compose
- $HOME/.gradle:/home/gradle/.gradle
ports:
- "80:8080"
- "50000:50000"
EOF
插件加速
sed -i 's/http:\/\/updates.jenkins-ci.org\/download/https:\/\/mirrors.tuna.tsinghua.edu.cn\/jenkins/g' default.json && sed -i 's/http:\/\/www.google.com/https:\/\/www.baidu.com/g' default.json
修改 maven settings.xml
/docker-data/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven/conf/settings.xml
网友评论