From 8143d4e7e8c67ce6c1f6d7477ea2a37ae31ce042 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Sun, 10 Dec 2017 01:53:58 +0100 Subject: [PATCH] build: list only relevant docker images and push after build --- build/docker.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build/docker.sh b/build/docker.sh index 3c43dc4e6..d31d2f2d9 100755 --- a/build/docker.sh +++ b/build/docker.sh @@ -33,7 +33,17 @@ for v in "$@" ; do docker tag fabiolb/fabio:$v fabiolb/fabio:latest done -echo "Building docker image $tag" -docker build -q -t $tag . +docker images | grep '/fabio' | egrep "($v|latest)" -docker images +read -p "Push docker images? (y/N) " -n 1 -r +echo +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + echo "Not pushing images. Exiting" + exit 0 +fi + +echo "Pushing images..." +docker push fabiolb/fabio:$v +docker push fabiolb/fabio:latest +docker push magiconair/fabio:$v +docker push magiconair/fabio:latest