Neivanny1 / DevOps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing Jenkins Inside Docker.

Step 1:

Install docker if not installed: https://docs.docker.com/engine/install/

Step 2

Pull Jenkins Image for docker hub:
RUN:
sudo docker pull jenkins/jenkins:lts-jdk17

Step 3

Start a jenkins container in background at port 8080 with command:
RUN:
sudo docker run --rm --name jenkins -p 8080:8080 jenkins/jenkins:lts-jdk17

step 4

To access the jenkins server web UI
Check your machine ip adress:
RUN:
ifcongig
Copy the Ip address and open your web browser, the type:
http://your_IP:8080
A web UI will open up prompting for password

Step 5

To get the password:
RUN:
sudo docker exec jenkinServer cat /var/jenkins_home/secrets/initialAdminPassword

Step 6

Voila Jenkins server in now in your docker

Jenkins Documentation

Link: https://hub.docker.com/r/jenkins/jenkins

Link to youtube video

Link: https://www.youtube.com/watch?v=QNZNfvrFBMo

About