1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 17:51:24 +00:00
dockerfiles/builder/README.md

33 lines
774 B
Markdown
Raw Normal View History

2015-07-08 18:37:48 +00: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 14:09:19 +00:00
- ~/.docker:/.docker:ro
2015-07-08 18:37:48 +00:00
environment:
- GIT_REPO=https://github.com/vimagick/dockerfiles.git
- DOCKERFILE_PATH=/test
2015-08-05 08:55:26 +00:00
- IMAGE_NAME=vimagick/test:latest
2015-07-08 18:37:48 +00:00
privileged: true
```
2015-08-05 08:55:26 +00: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 18:37:48 +00:00
## build docker image
```
$ cd ~/fig/builder/
$ docker login
2015-08-05 08:55:26 +00:00
$ docker-compose run --rm -e DOCKERFILE_PATH=/tinc -e IMAGE_NAME=vimagick/tinc builder
2015-07-08 18:37:48 +00:00
$ docker search vimagick/tinc
```
2015-08-05 08:55:26 +00:00
[1]: https://github.com/tutumcloud/builder#hooks