Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sanjaygeeky/d2762bf5ec69db7008f194c3b5dff5bc to your computer and use it in GitHub Desktop.
Save sanjaygeeky/d2762bf5ec69db7008f194c3b5dff5bc to your computer and use it in GitHub Desktop.
Docker Compose spec to launch Jenkins along with dind (docker host) as per the official documentation at https://www.jenkins.io/doc/book/installing/#installation-platforms
version: "3.8"
networks:
jenkins:
driver: bridge
volumes:
jenkins-docker-certs:
jenkins-data:
services:
docker:
image: docker:dind
ports:
- 2376:2376
environment:
- DOCKER_TLS_CERTDIR=/certs
networks:
jenkins:
aliases:
- docker
privileged: true
volumes:
- jenkins-docker-certs:/certs/client
- jenkins-data:/var/jenkins_home
jenkins:
image: jenkinsci/blueocean
ports:
- 8080:8080
- 50000:50000
environment:
- DOCKER_HOST=tcp://docker:2376
- DOCKER_CERT_PATH=/certs/client
- DOCKER_TLS_VERIFY=1
networks:
jenkins:
aliases:
- docker
volumes:
- jenkins-data:/var/jenkins_home
- jenkins-docker-certs:/certs/client:ro
depends_on:
- docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment