Build the Jenkins environment in Docker

Source: Internet
Author: User

Want to build a Jenkins environment in Docker. At the beginning I wanted to pull CentOS first, and then I built the environment inside, the environment can run, but I do not know which data to mount, which is why I am not familiar with Jenkins.

Colleague told me a new idea https://registry.hub.docker.com/_/jenkins/in the official website, look for the mirror, see information (originally I also know this method, but because all is English, do not want to look, but look, Found not so dull as imagined).

Docker pull Jenkins Download image

Docker Run-it Jenkins goes into the mirror and looks at the UID of the Jenkins user 1000

Since I have built jenkins,uid in the host, I changed the UID of Jenkins in the host to Usermod-u

If not changed to the same UID, can not start.

And then according to the information method in the official website, directly

Docker run--name jenkins-d-P 18080:8080-v/opt/jenkins:/var/jenkins_home Jenkins

The building is successful.

HTTP://LOCALHOST:18080 can see Jenkins in the browser.

Build the Jenkins environment in Docker

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.