Installation and deployment method of docker+jenkins
This article focuses on "how to install and deploy docker+jenkins". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "the method of installation and deployment of docker+jenkins"!
Next, write a random note, hoping to help you:
Download the image
Docker pull jenkins/jenkins! [0] (https://upload-images.jianshu.io/upload_images/23729306-9ffc7abf157155ba?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Create a mount folder
Mkdir / jenkins! [0] (https://upload-images.jianshu.io/upload_images/23729306-e41354f38f10c27b?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
View file permissions
Ls-nd jenkins/
Give uid a permission of 1000
Chown-R 1000 jenkins/ 1000 jenkins/! [0] (https://upload-images.jianshu.io/upload_images/23729306-5d13d3a1709c062f?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Start
Docker run-itd-p 8080 privileged=true 8080-p 50000-- name jenkins-- privileged=true-v / jenkins:/var/jenkins_home jenkins/jenkins
Generate configuration information in jenkins
! [0] (https://upload-images.jianshu.io/upload_images/23729306-0fea599bd5797cb7?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Configure maven and jdk
Copy jdk and maven to jekins mapping path
! [0] (https://upload-images.jianshu.io/upload_images/23729306-a73abffff9b1ab56?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
When configuring, the path is written to the path in the 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)
Password configuration
1: visit http://192.168.137.21:8080
Password address:
Install the plug-in
! [0] (https://upload-images.jianshu.io/upload_images/23729306-f7beeb6c7325c367?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Upgrade site
! [0] (https://upload-images.jianshu.io/upload_images/23729306-52f997e82a6e5c55?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Manually install the plug-in (press Select)
Maven IntegrationDeploy to containerPublish Over SSHsshCloudBees Docker Build and PublishdockerDocker Swarmdocker-build-step so far, I believe you have a deeper understanding of the "method of installation and deployment of docker+jenkins". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!