summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/xds-docker-create-container.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/xds-docker-create-container.sh b/scripts/xds-docker-create-container.sh
index 52dfda3..0adc2d9 100755
--- a/scripts/xds-docker-create-container.sh
+++ b/scripts/xds-docker-create-container.sh
@@ -30,6 +30,16 @@ VERSION=4.0
DOCKER_USER=devel
DEFIMAGE=$REGISTRY/$REPO/$NAME-$FLAVOUR:$VERSION
+docker images |grep $DEFIMAGE 2>&1 > /dev/null
+if [ "$?" = "1" ]; then
+ VERSION=`docker images $REGISTRY/$REPO/$NAME-$FLAVOUR:* --format "{{.Tag}}"`
+ if [ "$VERSION" = "" ]; then
+ echo "ERROR: cannot automatically retrieve image tag for $REGISTRY/$REPO/$NAME-$FLAVOUR"
+ exit 1
+ fi
+ DEFIMAGE=$REGISTRY/$REPO/$NAME-$FLAVOUR:$VERSION
+fi
+
function usage() {
echo "Usage: $(basename $0) <instance ID> [image name]" >&2