#6 How to setup Jenkins with Docker

Here’s how to setup Jenkins with Docker

  1. Run the following commands in your terminal
1
2
3
4
docker pull jenkins/jenkins:lts
docker run --detach --publish 8080:8080 --volume
jenkins_home:/var/jenkins_home --name jenkins jenkins/jenkins:lts
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
  1. The above command will generate a password. Copy said password

  2. Open localhost:8080 and paste in the password

  3. Setup your user account and install suggested plugins.

That’s it!

#tools