script to pull, start and stop docker image
This commit is contained in:
parent
57584a0a26
commit
3addec0a27
|
@ -0,0 +1,9 @@
|
|||
BUILD_VERSION=0.0.1-SNAPSHOT
|
||||
JAVA_VERSION=11
|
||||
SMARTGEARS_VERSION=4.0.1-SNAPSHOT
|
||||
IMAGE_VERSION=${BUILD_VERSION}-java${JAVA_VERSION}-smartgears${SMARTGEARS_VERSION}
|
||||
NAME=helloworld
|
||||
|
||||
BUILD_NAME=$NAME:$IMAGE_VERSION
|
||||
HARBOR_IMAGE_NAME=hub.dev.d4science.org/gcube/$BUILD_NAME
|
||||
DOCKER_IMAGE=$HARBOR_IMAGE_NAME
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -a
|
||||
. ./docker.conf
|
||||
docker pull $DOCKER_IMAGE
|
||||
|
||||
echo "Docker image $DOCKER_IMAGE"
|
||||
|
||||
set +a
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -a
|
||||
. ./docker.conf
|
||||
echo "Docker image $DOCKER_IMAGE"
|
||||
docker pull $DOCKER_IMAGE
|
||||
docker run -d -p 9991:8080 --name $NAME $DOCKER_IMAGE
|
||||
|
||||
set +a
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -a
|
||||
. ./docker.conf
|
||||
|
||||
docker stop $NAME
|
||||
docker rm $NAME
|
||||
|
||||
set +a
|
||||
|
Loading…
Reference in New Issue