更改镜像源
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://****.mirror.aliyuncs.com"]
}
EOF重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker下载Jenkins
docker pull jenkins/jenkins:lts运行Jenkins
docker run -p 8080:8080 -p 50000:5000 --name jenkins -u root -v /home/zkgc/mydata/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v /etc/docker:/etc/docker -d jenkins/jenkins:lts安装插件
Docker plugin
Docker Pipeline
Blue Ocean添加 多分支流水线 作业
Git 测试工程
https://gitee.com/benbenyezi/Jenkinsfile-test/tree/master/
chmod 777 /var/run/docker.sock