
Running Jenkins in Docker
Prerequisites
- Docker installed
Pulling the Docker image
docker pull jenkins/jenkinsAfter you have pulled the Docker image, create a folder that Jenkins will mount from the host.
I created it at /data/jenkins.
chmod 777 /data/jenkinsThen run the image.
docker run --name jenkins -dit -p 8080:8080 -p 50000:50000 -v /data/jenkins:/var/jenkins_home jenkins/jenkinsThe first time you open Jenkins, it asks you for a password. You can find that password in the logs.
docker logs jenkins
Comments 0
A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.