Docker jenkins
Creating Jenkins docker container on our host machine,
Ref: https://hub.docker.com/r/jenkins/jenkins
Ref: https://github.com/jenkinsci/docker/blob/master/README.md
$ docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
Let's check whether the container is running or not
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
276ebc3dd098 jenkins/jenkins:lts "/sbin/tini -- /usr/…" 3 minutes ago Up 3 minutes sweet_mirzakhani
Now let's check the docker logs with the below command with the container ID, so that we can find the initial setup password for Jenkins.
$ docker logs 276ebc3dd098
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
7b87d5e13889407fa321f15f7a8f00ef
This may also be found at: /var/jenkins_home/secrets/initialAdminPassword