Skip to content

Commit

Permalink
build: list only relevant docker images and push after build
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Dec 10, 2017
1 parent de0bf47 commit 8143d4e
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions build/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8143d4e

Please sign in to comment.