From 19647f280b7cc2ecd073b13779fa68657fad6b57 Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 5 Aug 2015 16:55:26 +0800 Subject: [PATCH] update builder --- builder/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/builder/README.md b/builder/README.md index ff1a9cc..f8d3461 100644 --- a/builder/README.md +++ b/builder/README.md @@ -8,20 +8,26 @@ A docker image that builds, tests and pushes docker images from code repositorie ``` builder: image: tutum/builder - command: vimagick/test volumes: - ~/.dockercfg:/.dockercfg:ro + - /var/run/docker.sock:/var/run/docker.sock:rw environment: - GIT_REPO=https://github.com/vimagick/dockerfiles.git - DOCKERFILE_PATH=/test + - IMAGE_NAME=vimagick/test:latest privileged: true ``` +- 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. + ## build docker image ``` $ cd ~/fig/builder/ $ docker login -$ docker-compose run --rm -e DOCKERFILE_PATH=/tinc builder vimagick/tinc:latest +$ docker-compose run --rm -e DOCKERFILE_PATH=/tinc -e IMAGE_NAME=vimagick/tinc builder $ docker search vimagick/tinc ``` + +[1]: https://github.com/tutumcloud/builder#hooks