Skip to main content

Command Palette

Search for a command to run...

Jenkins Using Docker

Published
1 min read
N

Hey, I am Nidhish Malav i am a aspiring cloud enthusiast who is eager to embark on a journey into the world of cloud computing. With a strong passion for technology and a keen interest in cloud-based solutions, I am driven to learn and contribute to the ever-evolving field of cloud computing. As a student of Computer Science, I acquired a solid foundation in fundamental programming concepts, networking, and system administration.

Steps

  •   docker pull jenkins/jenkins
    

    Use this comment to install jenkins image.

  •   sudo mkdir /var/jenkins_home
    

    Create a File for jenkins in your machine by running this command.

  •   sudo chmod 777 /var/jenkins_home/ -R
    

    Give permission to the file.

  •   docker run -p 9080:8080 -d -v /var/jenkins_home:/var/jenkins_home jenkins/jenkins
    

    Setting the jenkins port with local ip 9080 -d to run in background the rest is the location of docker image.

  •   docker container ls
    

    To check the Status of Container.

  •   cd /var/jenkins_home/
      ls
      cd secrets
      ls
      cat initialAdminPassword
    

    Run these commands 1 at a time to achieve the password.

  •   ifconfig
    

    Use this command to get the ip of your local machine. Copy the ip and run it with the configured port (9080).

  • Install some plugins for jenkins like Blue ocean for a better interface.

  • Below are the screenshot of all the process. The ip is highlighted which to use.

Jenkins Using Docker