https://github.com/springernature/halfpipe-docker-compose
docker image with dind for running docker-compose tasks in halfpipe
https://github.com/springernature/halfpipe-docker-compose
ee-release-engineering engineering-enablement
Last synced: over 1 year ago
JSON representation
docker image with dind for running docker-compose tasks in halfpipe
- Host: GitHub
- URL: https://github.com/springernature/halfpipe-docker-compose
- Owner: springernature
- Created: 2018-07-27T22:05:20.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-07-29T12:48:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-10T14:32:41.587Z (over 1 year ago)
- Topics: ee-release-engineering, engineering-enablement
- Language: Shell
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 54
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Halfpipe docker-compose
A container running the docker daemon for times when docker-in-docker ("dind") is needed. Used by the halfpipe `docker-compose` and `consumer-integration-test` tasks.
It sets the environment variable `DIND_HOST` which can be passed into containers which need access to the docker daemon.
example `docker-compose.yml`:
```
version: '3'
services:
app:
image: ubuntu
command: ./build
working_dir: /work
volumes:
- .:/work
environment:
DOCKER_HOST: $DIND_HOST
```
### Docker Image Cache
> This feature is not used by halfpipe since it turns out that loading an image from cache is no faster than downloading it :(
The startup script supports loading saved docker image tar files. They can be passed into the task as inputs in a subdirectory under `./docker-images` - i.e. `/tmp/build/xxxxx/docker-images`.
On startup the task loops through these directories and `docker load`s them.
#### example
```yaml
resources:
- name: git
type: git
source:
paths:
- docker-compose
private_key: ((github.private_key))
uri: git@github.com:springernature/halfpipe-examples
- name: appropriate_curl
type: docker-image
source:
repository: appropriate/curl
- name: nginx
type: docker-image
source:
repository: nginx
jobs:
- name: test in docker-compose
serial: true
plan:
- aggregate:
- get: git
trigger: true
- get: appropriate_curl
params:
save: true
- get: nginx
params:
save: true
- task: test in docker-compose
privileged: true
config:
platform: linux
image_resource:
type: docker-image
source:
password: ((gcr.private_key))
repository: eu.gcr.io/halfpipe-io/halfpipe-docker-compose
tag: latest
username: _json_key
params:
GCR_PRIVATE_KEY: ((gcr.private_key))
run:
path: docker.sh
args:
- |
export GIT_REVISION=`cat ../.git/ref`
docker login -u _json_key -p "$GCR_PRIVATE_KEY" https://eu.gcr.io
docker-compose run -e GIT_REVISION app
dir: git/docker-compose
inputs:
- name: git
- name: appropriate_curl
path: docker-images/appropriate_curl
- name: nginx
path: docker-images/nginx
```