您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本篇内容主要讲解“docker+jenkins的安装部署方法”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“docker+jenkins的安装部署方法”吧!
接下来写一篇随机笔记,希望可以帮助大家:
下载镜像
docker pull jenkins/jenkins ![0](https://upload-images.jianshu.io/upload_images/23729306-9ffc7abf157155ba?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
创建挂载文件夹
mkdir /jenkins ![0](https://upload-images.jianshu.io/upload_images/23729306-e41354f38f10c27b?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
查看文件权限
ls -nd jenkins/
给uid为1000的权限
chown -R 1000:1000 jenkins/ ![0](https://upload-images.jianshu.io/upload_images/23729306-5d13d3a1709c062f?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
启动
docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /jenkins:/var/jenkins_home jenkins/jenkins
jenkins中生成配置信息
![0](https://upload-images.jianshu.io/upload_images/23729306-0fea599bd5797cb7?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
配置maven和jdk
复制jdk和maven到jekins映射路径下
![0](https://upload-images.jianshu.io/upload_images/23729306-a73abffff9b1ab56?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
配置的时候路径写jenkins内的路径
/var/jenkins_home/jdk1.8.0_91 /var/jenkins_home/apache-maven-3.5.3 ![0](https://upload-images.jianshu.io/upload_images/23729306-d9744ab17b056cb1?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![0](https://upload-images.jianshu.io/upload_images/23729306-11f728a63b050551?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
密码配置
1:访问 http://192.168.137.21:8080
密码地址:
安装插件
![0](https://upload-images.jianshu.io/upload_images/23729306-f7beeb6c7325c367?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
升级站点
![0](https://upload-images.jianshu.io/upload_images/23729306-52f997e82a6e5c55?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
手动安装插件(按选择)
Maven Integration Deploy to container Publish Over SSH ssh CloudBees Docker Build and Publish docker Docker Swarm docker-build-step
到此,相信大家对“docker+jenkins的安装部署方法”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。