Skip to content

chromiumsilver/my-jenkins-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Run Jenkins in Docker using Docker Compose

This repository provides a simpler way to run Jenkins using Docker Compose. It is based on the official installation guide, but with one-command setup and management instead of running multiple docker commands manually.

Prerequisites

Quick Start

  1. Clone this repository

  2. Start Jenkins:

    Make sure you are in the directory containing the compose.yaml and Dockerfile files:

    docker compose up -d

    Note: Docker Compose will automatically build the custom Jenkins image from the Dockerfile. If you want to build it separately first, you can run:

    docker compose build
  3. Access Jenkins:

  4. Unlock Jenkins:

    • The initial admin password is located in the Jenkins container:
      docker exec my-jenkins cat /var/jenkins_home/secrets/initialAdminPassword
    • Copy and paste this password into the Jenkins setup wizard.
  5. Install suggested plugins and create your admin user.

Stop & Restart Jenkins

To stop the containers:

docker compose down

This will stop and remove the containers but keep your Jenkins data.

To restart Jenkins, just run:

docker compose up -d

Update Jenkins

Make sure to stop all the containers using commands above before doing any update. To update Jenkins Core, build the custom Jenkins image again by running

docker compose build

Note: Plugin updates can simply be done through the Jenkins GUI.

Cleanup

To completely remove Jenkins and all associated resources:

docker compose down --volumes --rmi all

This command will:

  • Stop and remove the containers
  • Delete the network configuration
  • Delete all Jenkins data (volumes)
  • Remove the Docker images

References

About

A quick installation of Jenkins using Docker Compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published