1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
dockerfiles/builder/README.md

33 lines
774 B
Markdown
Raw Normal View History

2015-07-08 20:37:48 +02:00
tutum/builder
=============
A docker image that builds, tests and pushes docker images from code repositories.
## docker-compose.yml
```
builder:
image: tutum/builder
volumes:
2015-09-23 16:09:19 +02:00
- ~/.docker:/.docker:ro
2015-07-08 20:37:48 +02:00
environment:
- GIT_REPO=https://github.com/vimagick/dockerfiles.git
- DOCKERFILE_PATH=/test
2015-08-05 10:55:26 +02:00
- IMAGE_NAME=vimagick/test:latest
2015-07-08 20:37:48 +02:00
privileged: true
```
2015-08-05 10:55:26 +02:00
- If `IMAGE_NAME` not specified, it will be built and tested, but not pushed.
- [Hooks][1] in `$DOCKERFILE_PATH/hooks/` will be executed before and after each step.
2015-07-08 20:37:48 +02:00
## build docker image
```
$ cd ~/fig/builder/
$ docker login
2015-08-05 10:55:26 +02:00
$ docker-compose run --rm -e DOCKERFILE_PATH=/tinc -e IMAGE_NAME=vimagick/tinc builder
2015-07-08 20:37:48 +02:00
$ docker search vimagick/tinc
```
2015-08-05 10:55:26 +02:00
[1]: https://github.com/tutumcloud/builder#hooks