X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fxds-docker-create-container.sh;h=d041a223cfb75069d7112ecdef1abce00f99d805;hb=cd43200c4814e86d2774b3181c4f8f9bd3755f5b;hp=b75ecfda8d0b2d5391e6120b80fbc67a8c56ca1c;hpb=396aa84d2521516168cf0e3e8119d550327dff45;p=src%2Fxds%2Fxds-server.git diff --git a/scripts/xds-docker-create-container.sh b/scripts/xds-docker-create-container.sh index b75ecfd..d041a22 100755 --- a/scripts/xds-docker-create-container.sh +++ b/scripts/xds-docker-create-container.sh @@ -22,7 +22,7 @@ REGISTRY=docker.automotivelinux.org REPO=agl NAME=worker FLAVOUR=xds -VERSION=3.99.1 +VERSION=4.0 # --------------------------------------------------- # --- computed - don't touch ! @@ -61,7 +61,11 @@ while [ $# -ne 0 ]; do shift done -[ "$ID" = "" ] && usage +[ "$ID" = "" ] && ID=0 + +docker ps -a |grep "$IMAGE" > /dev/null +[ "$?" = "0" ] && { echo "Image name already exist ! (use -h option to read help)"; exit 1; } + USER=$(id -un) echo "Using instance ID #$ID (user $(id -un))"