Skip to main content

Installing jenkins in the Docker Container

Pulling jenkins Image#

docker pull jenkins/jenkins:lts

Presisting the Jenkins Storage#

jenkins volume create jenkinsvol1

Creating Jenkins in Docker#

docker container run -d -p 8356:8080 -v jenkinsvol1:/var/jenkins_home --name jenkins-local jenkins/jenkins:lts

Administrator Password#

docker exec -itu root {containerName} passwd

Executing the docker Image#

docker exec -it jenkins-local /bin/bash

Root Mode#

su 

Administartor Password#

cat /var/jenkins_home/secrets/initialAdminPassword

alt text

  • Click on the Custom Plugin to Install Plugins.
  • Create your Username
  • Configure the Jenkins to the Default local Address
localhost:8356
  • Click on Start Using Jenkins

alt text

You can refer to the this for the Python Installation in the Jenkins-local container.

Here are some tips
  • You can execute the commands without using sudo
  • use the apt update command before installing python to the docker container
  • you can execute the python version using /usr/bin/python3.7