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