美文网首页K8S
SpringBoot Dockerfile Jenkinsfil

SpringBoot Dockerfile Jenkinsfil

作者: Demons_LLL | 来源:发表于2022-10-01 11:05 被阅读0次
  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 Jenkinsfil

    本文链接:https://www.haomeiwen.com/subject/kihdartx.html