From 7a59c5fad881633aa913ff122204595056a58083 Mon Sep 17 00:00:00 2001 From: "Tobias L. Maier" Date: Sun, 29 Apr 2018 07:23:04 +0200 Subject: [PATCH] Add build and push scripts --- hooks/build | 11 +++++++++++ hooks/push | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100755 hooks/build create mode 100755 hooks/push 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