您好,登錄后才能下訂單哦!
本篇內容主要講解“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)
創(chuàng)建掛載文件夾
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的安裝部署方法”有了更深的了解,不妨來實際操作一番吧!這里是億速云網(wǎng)站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續(xù)學習!
免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。