https://github.com/dflemstr/drone-dind
A Docker image for Drone CI that starts an isolated Docker daemon
https://github.com/dflemstr/drone-dind
Last synced: about 1 month ago
JSON representation
A Docker image for Drone CI that starts an isolated Docker daemon
- Host: GitHub
- URL: https://github.com/dflemstr/drone-dind
- Owner: dflemstr
- Created: 2015-11-09T14:38:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-09T16:35:11.000Z (over 10 years ago)
- Last Synced: 2025-03-21T15:32:09.824Z (over 1 year ago)
- Language: Shell
- Size: 0 Bytes
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Drone base image for Docker-in-Docker
This repository builds a Docker image to be used with [Drone CI][1]
that starts an isolated Docker daemon for your builds. This enables
the building of Docker-based projects in Drone.
## Usage
Given a repository containing a `Dockerfile`, put the following in
your Drone configuration file `.drone.yml`:
```yaml
image: dflemstr/drone-dind
script:
- docker build -t me/myservice .
- docker push me/myservice:latest
```
Add this repository to your Drone instance, making sure that you use
privileged containers (since Docker-in-Docker requires that). You can
now successfully build Docker-based projects on top of Drone.
## How it works
The image contains two scripts, `start-docker` and `stop-docker`, that
will start and stop the inner Docker daemon, respectively. There is
also a file called `docker-helper.sh` that gets `source`d by Drone on
every build, that makes sure that `start-docker` is ran before, and
`stop-docker` is ran after the build.
[1]: https://drone.io/