SpringBoot Dockerfile Jenkinsfile ...

1. 安装docker https://developer.aliyun.com/mirror/?spm=a2c6h.13651102.0.0.3e221b11CaYN2C&serviceType=mirror&tag=%E5%AE%B9%E5%99%A8 2. 更改镜像源 https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://****.mirror.aliyuncs.com"] } EOF 3. 重启docker sudo systemctl daemon-reload sudo systemctl restart docker 4. 下载Jenkins docker pull jenkins/jenkins:lts 5. 运行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 6. 安装插件 Docker plugin Docker Pipeline Blue Ocean 7. 添加 多分支流水线 作业 8. Git 测试工程 https://gitee.com/benbenyezi/Jenkinsfile-test/tree/master/ chmod 777 /var/run/docker.sock

你可能感兴趣的:(SpringBoot Dockerfile Jenkinsfile ...)