1
0
Fork
You've already forked jenkins-local
0
This project can be used for deploying a local instance of Jenkins, using Docker Compose, with Docker (and Compose) capabilities in it.
  • Dockerfile 100%
2026年01月24日 23:08:42 +02:00
docker-compose.yaml add readme 2023年11月06日 22:02:18 +00:00
Dockerfile use jenkins lts version; install latest docker-compose 2026年01月24日 23:08:42 +02:00
README.md add readme 2023年11月06日 22:02:18 +00:00

Local Jenkins with Docker & Compose

This project can be used for deploying a local instance of Jenkins, using Docker Compose, with Docker (and Compose) capabilities in it.

Configuration

Host environment variable Default value Description
YOUR_HOST_DOCKER_GID 997 Your host's Docker group ID, which will be mapped into the Docker image.
AN_ALTERNATIVE_GID 990 An alternative number to assign as a group ID, to replace whatever may be occupying the above host docker group ID.
JENKINS_PORT 8080 The host port to map for exposing the Jenkins container locally.

Deployment

export HOST_DOCKER_GID=$(getent group docker | cut -d ':' -f 3)
docker volume create jenkins_home
docker compose up -d

Cleanup

docker compose down
docker volume rm jenkins_home # optional

Caveats

Based on your host's docker group ID (HOST_DOCKER_GID), it could conflict with an existing group ID in the Jenkins Docker image. If so then there is an optional alternative value (AN_ALTERNATIVE_GID) which can replace the conflicting group ID without affecting the host configuration.