This repository contains a Docker Compose configuration for a quick installation of Jenkins. This setup is not intended for production systems.
Credits: This approach is mostly based on the offical instructions but takes advantage of Docker Compose (by using a docker-compose.yml
file) to reduce the number of steps needed to get Jenkins up and running.
Install Docker locally (probably using Docker Desktop is the easiest approach).
Clone this repository or download it's contents.
Open a terminal window in the same directory where the Dockerfile
from this repository is located. Build the Jenkins Docker image:
docker build -t my-jenkins .
Start Jenkins:
docker compose up -d
Open Jenkins by going to: http://localhost:8080/ and finish the installation process.
If you wish to stop Jenkins and get back to it later, run:
docker compose down
If you wish to start Jenkins again later, just run the same comand from Step 3.
Once you are done playing with Jenkins maybe it is time to clean things up.
Run the following comand to terminate Jenkins and to remove all volumes and images used:
docker compose down --volumes --rmi all