From 6171bc2b45ea388d2d588bbd443806cc28ca6d76 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Mon, 15 Oct 2018 12:49:40 +0200 Subject: [PATCH] Add --pull --no-fetch build options on refresh --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index cb5d55c..bd05bf8 100755 --- a/build.sh +++ b/build.sh @@ -4,6 +4,7 @@ cd "$(dirname "$0")" source common.bash SKIP_DOWNLOAD=0 +REFRESH="" while getopts "nhr?" opt; do case $opt in n) @@ -17,6 +18,8 @@ while getopts "nhr?" opt; do docker rmi -f $maintainer/$imagename:$tag echo "Done" fi + REFRESH="--no-cache --pull" + echo "Using 'refresh' mode: $REFRESH" ;; h | ?) echo "Options: -n skip download" @@ -29,7 +32,7 @@ while getopts "nhr?" opt; do esac done if [ "$SKIP_DOWNLOAD" = "0" ]; then ./download-midpoint || exit 1; fi -docker build --tag $maintainer/$imagename:$tag --build-arg maintainer=$maintainer --build-arg imagename=$imagename . || exit 1 +docker build $REFRESH --tag $maintainer/$imagename:$tag --build-arg maintainer=$maintainer --build-arg imagename=$imagename . || exit 1 echo "---------------------------------------------------------------------------------------" echo "The midPoint containers were successfully built. To start them, execute the following:" echo ""