Interview Prep/Jenkins/Best practices & rapid-fire commands

Rapid-fire: how do you run the controller in Docker for a quick test?

BeginnerConceptBest practices & rapid-fire commands
Answer
docker volume create jenkins_home
docker run -d --name jenkins -p 8080:8080 -p 50000:50000 \
  -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts-jdk21
docker logs -f jenkins

Never mount the host Docker socket into this container for convenience on anything but a throwaway laptop setup.

All Jenkins questions Roadmap: Jenkins

More on Best practices & rapid-fire commands