Last active
June 21, 2020 00:30
-
-
Save adelmofilho/5e4b2a57b402e218300332dd0a88a881 to your computer and use it in GitHub Desktop.
Docker sock mount approach to run Jenkins as a Docker container
This file contains 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
# This docker-compose file intent to run a Jenkins container connected to the host machine Docker daemon. | |
# | |
# A discussion about potential security issues and improvements on this approach can be found at: | |
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11 | |
# | |
# Source: http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ | |
version: '3.1' | |
volumes: | |
jenkins-data: | |
services: | |
jenkins: | |
image: jenkinsci/blueocean | |
restart: always | |
ports: | |
- 8080:8080 | |
- 50000:50000 | |
tty: true | |
volumes: | |
- jenkins-data:/var/jenkins_home | |
- /var/run/docker.sock:/var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment