+# Dynamically retrieve image name
+if [ "$IMAGE" = "" ]; then
+
+ VER_NUM=`docker images $REGISTRY/$REPO/$NAME-$FLAVOUR:* --format {{.Tag}} | wc -l`
+ if [ $VER_NUM -gt 1 ]; then
+ echo "ERROR: more than one xds image found, please set explicitly the image to use !"
+ exit 1
+ elif [ $VER_NUM -lt 1 ]; then
+ echo "ERROR: cannot automatically retrieve image tag for $REGISTRY/$REPO/$NAME-$FLAVOUR"
+ exit 1
+ fi
+
+ VERSION=`docker images $REGISTRY/$REPO/$NAME-$FLAVOUR:* --format {{.Tag}}`
+ if [ "$VERSION" = "" ]; then
+ echo "ERROR: cannot automatically retrieve image tag for $REGISTRY/$REPO/$NAME-$FLAVOUR"
+ usage
+ exit 1
+ fi
+
+ IMAGE=$REGISTRY/$REPO/$NAME-$FLAVOUR:$VERSION
+fi
+