Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uudashr/jenkins-docker
Jenkins with Docker inside
https://github.com/uudashr/jenkins-docker
continuous-delivery continuous-integration devops docker jenkins
Last synced: 13 days ago
JSON representation
Jenkins with Docker inside
- Host: GitHub
- URL: https://github.com/uudashr/jenkins-docker
- Owner: uudashr
- Created: 2017-04-16T09:17:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T07:25:24.000Z (almost 8 years ago)
- Last Synced: 2024-11-14T04:34:44.263Z (2 months ago)
- Topics: continuous-delivery, continuous-integration, devops, docker, jenkins
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/uudashr/jenkins-docker.svg?branch=master)](https://travis-ci.org/uudashr/jenkins-docker)
# Jenkins with Docker inside
`uudashr/jenkins-docker`
The official [Jenkins](https://hub.docker.com/r/jenkinsci/jenkins/) doesn't have Docker installed. Since Docker has a lot of value when we are using [Pipeline](https://jenkins.io/doc/book/pipeline/) so that we need the Jenkins image with Docker inside.
On the Jenkins side, we are going to unitize the Docker client. Docker daemon host on different container. The reason for this is to make it simple, and go back to the concept single container service. We are going to use [Docker-in-Docker](https://hub.docker.com/_/docker) for the daemon.
Docker daemon address defined by environment variable `DOCKER_HOST` using default `tcp://docker:2375`.
```properties
DOCKER_HOST=tcp://docker:2375
```## Local Testing
### Docker Compose
Docker compose will take care the spawning of the services.
```shell
$ docker-compose up -d
```### Manual Docker Run
```shell
# Run the Docker daemon
$ docker run -d --privileged --name dind -v ~/temp/docker/dind:/var/lib/docker docker:dind# Run the Jenkins
$ docker run -d --name jenkins --link dind:docker -p 8080:8080 -p 50000:50000 -v ~/temp/docker/jenkins_home:/var/jenkins_home -e DOCKER_HOST=tcp://docker:237 uudashr/jenkins-docker
```## Reference
- https://github.com/killercentury/docker-jenkins-dind/blob/master/Dockerfile
- https://hub.docker.com/_/docker/