How to use Docker to learn Jenkins

Plan of Attack

Quick Terms

Let’s Get Started

docker run --rm -it --name jenkins_medium_demo --publish 8080:8080 --publish 50000:50000 --volume jenkins_home:/var/jenkins_home jenkins/jenkins:lts /bin/bash
You know my one-time password now!
Be careful not to sign away your first-born, while clicking through default-installs
my password is password, hack me.
In this demo, I accidentally did not make my user a part of the “docker” group; you shouldn’t use sudo here

Optional: Running Docker inside Docker

docker run -it --rm -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock jenkins_post_setup:base-install
Docker gives each container an easily written name if you don’t do it yourself. In this case, “silly_albattani”
here docker is group 128



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