Categories
News

Quick Jenkins Docker Standup

Hi, it’s me again, and today I decided to deploy Jenkins, but this time I wanted to run it under Docker. As you know Docker enables developers to easily pack, ship, and run any application as a lightweight, portable, self-sufficient container, which can run virtually anywhere

Let’s jump into it shall we.

  • Deployed my ubuntu server 20.04 template to my lab environment
  • Logged in via SSH and updated my OS
    • sudo apt update && sudo apt -y upgrade && sudo apt -y autoclean && sudo apt -y autoremove
  • Installed docker
    • sudo apt install docker.io
  • Pulled the latest LTS version of Jenkins
    • sudo docker pull jenkins/jenkins
  • First, run of Jenkins
    • sudo docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
  • Setup Jenkins via webUI, setup accounts
  • Setup this Jenkins docker instance to auto restart on failure/reboot
    • sudo docker update –restart=on-failure <container ID>
  • Reboot my Ubuntu server host, tested accessing Jenkins
  • Also tested via the server cli
    • sudo docker ps

At this point, my Jenkins standup is completed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.