Here we will be using Jenkins inside docker. We will be using jenkins:lts image from docker-hub.

docker run -p 8082:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name jenkins \
jenkins/jenkins:lts

Jenkins will run on port 8082 of our system. You can change the ports accordingly.

Now we need to install docker inside Jenkins container. We will be having 2 users inside our docker container one will be and another will be .

Lets login as root user first to install docker

docker exec -it -u root jenkins bashapt-get updateapt install docker.iosystemctl start dockersystemctl enable docker

Now docker…

Lakshya Khanna

I am a front end react developer and python developer for backend.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store