Add support for rebuild to run-dev-container.sh

This commit is contained in:
Sébastien Deleuze
2023-07-31 15:14:24 +02:00
parent 857b193090
commit f282c64cf3

View File

@@ -4,6 +4,33 @@ REBUILD=false
HOST_WORK_DIR="$( pwd )"
CONTAINER_WORK_DIR=/workspace
while test $# -gt 0; do
case "$1" in
-h|--help)
echo "run-dev-container.sh - run Spring Checkpoint Restore smoke tests dev container"
echo " "
echo "run-dev-container.sh [options]"
echo " "
echo "options:"
echo "-h, --help show brief help"
echo "-r, --rebuild force container image rebuild"
exit 0
;;
-r)
export REBUILD=true
shift
;;
--rebuild)
export REBUILD=true
shift
;;
*)
break
;;
esac
done
docker image ls | grep spring-checkpoint-restore-smoke-tests-dev >/dev/null 2>&1 || export REBUILD=true
test "$REBUILD" = false || docker build \