diff --git a/hooks/build b/hooks/build new file mode 100755 index 0000000..d979609 --- /dev/null +++ b/hooks/build @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +set -e + +while read docker_version compose_version; +do + docker build \ + --build-arg DOCKER_VERSION=${docker_version} \ + --build-arg COMPOSE_VERSION=${compose_version} \ + -t $DOCKER_REPO:${docker_version} . +done < DOCKER_AND_COMPOSE_VERSION_MATRIX diff --git a/hooks/push b/hooks/push new file mode 100755 index 0000000..c7a50bb --- /dev/null +++ b/hooks/push @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e + +images=`docker image ls ${DOCKER_REPO} --format "{{.Repository}}:{{.Tag}}"`; + +for image in ${images}; +do + docker image push ${image} +done