aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 23:48:29 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 23:48:29 +0200
commitcd43200c4814e86d2774b3181c4f8f9bd3755f5b (patch)
treea3496e683ef9b17c7a1bbc6ae66290ec04f049f2
parent396aa84d2521516168cf0e3e8119d550327dff45 (diff)
Bump docker container version to 4.0 and update doc.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--README.md10
-rwxr-xr-xscripts/xds-docker-create-container.sh8
2 files changed, 11 insertions, 7 deletions
diff --git a/README.md b/README.md
index 6197418..da1c60c 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ been integrated into AGL SDK docker container.
Load the pre-build AGL SDK docker image including `xds-server`:
```bash
-wget -O - http://iot.bzh/download/public/2017/XDS/docker/docker_agl_worker-xds-latest.tar.xz | docker load
+seb@laptop ~$ wget -O - http://iot.bzh/download/public/2017/XDS/docker/docker_agl_worker-xds-latest.tar.xz | docker load
```
### List container
@@ -48,9 +48,9 @@ You should get `docker.automotivelinux.org/agl/worker-xds:X.Y` image
```bash
# List image that we just built
-docker images | grep worker-xds
+seb@laptop ~$ docker images | grep worker-xds
-docker.automotivelinux.org/agl/worker-xds 3.2 786d65b2792c 6 days ago 602MB
+docker.automotivelinux.org/agl/worker-xds 3.99.1 786d65b2792c 6 days ago 602MB
```
### Start xds-server within the container
@@ -62,12 +62,12 @@ Use provided script to create a new docker image and start a new container:
seb@laptop ~$ wget https://raw.githubusercontent.com/iotbzh/xds-server/master/scripts/xds-docker-create-container.sh
# Create new XDS worker container
-seb@laptop ~$ bash ./xds-docker-create-container.sh 0 docker.automotivelinux.org/agl/worker-xds:3.99.1
+seb@laptop ~$ bash ./xds-docker-create-container.sh docker.automotivelinux.org/agl/worker-xds:X.Y
# Check that new container is running
seb@laptop ~$ docker ps | grep worker-xds
-b985d81af40c docker.automotivelinux.org/agl/worker-xds:3.99.1 "/usr/bin/wait_for..." 6 days ago Up 4 hours 0.0.0.0:8000->8000/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:10809->10809/tcp, 0.0.0.0:2222->22/tcp agl-worker-seb@laptop-0-seb
+b985d81af40c docker.automotivelinux.org/agl/worker-xds:3.99.1 "/usr/bin/wait_for..." 6 days ago Up 4 hours 0.0.0.0:8000->8000/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:10809->10809/tcp, 0.0.0.0:2222->22/tcp agl-xds-seb@laptop-0-seb
```
This container (ID=0) exposes following ports:
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))"