Created
July 29, 2025 00:39
-
-
Save roxsross/e3cd45b796ad202ffd9e10dd75486d89 to your computer and use it in GitHub Desktop.
Jenkins CF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
jenkins: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
container_name: jenkins-master | |
restart: unless-stopped | |
ports: | |
- "8080:8080" | |
- "50000:50000" | |
volumes: | |
- jenkins_home:/var/jenkins_home | |
- jenkins-docker-certs:/certs/client:ro | |
environment: | |
- DOCKER_HOST=tcp://docker:2376 | |
- DOCKER_TLS_CERTDIR=/certs | |
- DOCKER_TLS_VERIFY=1 | |
- DOCKER_CERT_PATH=/certs/client | |
networks: | |
- jenkins | |
depends_on: | |
- docker-dind | |
docker-dind: | |
image: docker:27.3-dind | |
container_name: jenkins-docker | |
restart: unless-stopped | |
privileged: true | |
environment: | |
- DOCKER_TLS_CERTDIR=/certs | |
volumes: | |
- jenkins_home:/var/jenkins_home | |
- jenkins-docker-certs:/certs/client | |
ports: | |
- "2376:2376" | |
command: --storage-driver overlay2 | |
networks: | |
jenkins: | |
aliases: | |
- docker | |
volumes: | |
jenkins_home: | |
jenkins-docker-certs: | |
networks: | |
jenkins: | |
driver: bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins:lts | |
USER root | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
git \ | |
wget \ | |
unzip \ | |
software-properties-common \ | |
apt-transport-https \ | |
ca-certificates \ | |
gnupg \ | |
lsb-release | |
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | |
apt-get update && \ | |
apt-get install -y docker-ce-cli docker-buildx-plugin docker-compose-plugin | |
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" | |
USER jenkins | |
EXPOSE 8080 50000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment