怎么基于docker部署Jenkins

这篇文章主要介绍了基于docker部署Jenkins,本文通过图文并茂的形式给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

工具/原料

  • 华硕x555li
  • win10专业版

方式/步骤

  1. 1

    下载镜像,docker pull jenkins/jenkins

    c3c22dbf3bef354fe68f718823db574afb321b92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  2. 2

    查看jenkins的具体信息,docker inspect jenkins:2.200

    460fdc8333bf3bef8078950e3f3ea8db564a1a92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  3. 3

    启动容器,

    docker run -d --name Jenkins_01 -p 8081:8080 -v \

    /home/jenkins_home:/home/jenkins_home jenkins:2.200

    47bf594ec28333bf8fd8f0f9dbb8b43ea9db1d92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  4. 4

    查看启动的 jenkins 容器,是否健康,docker ps|grep jenkins

    f591ab03c8d246fef6790735b8bf3bef344f1e92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  5. 4
  6. 5

    web端拜候ip:端口

    c99358fe474ec2838088fe59be4f50b8b53e1c92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  7. 6

    进入容器,docker exec -it Jenkins_01 /bin/bash

    b442d6d246fe474e70b4f609b0ef354f51b81f92.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  8. 7

    按照提醒查看 密码 (在容器中),cat /var/jenkins_home/secrets/initialAdminPassword

    b955ead0b503c8d2f6c982f8498333bf3aef2192.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80END
  • 发表于 2021-05-26 20:01
  • 阅读 ( 317 )
  • 分类:其他类型

相关问题

0 条评论

请先 登录 后评论