config and script

This commit is contained in:
Alfredo Oliviero 2024-05-24 17:06:25 +02:00
parent 31340fb85e
commit e1af22962e
4 changed files with 28 additions and 18 deletions

View File

@ -1,9 +1,12 @@
BUILD_VERSION=0.0.1-SNAPSHOT MVN_VERSION: 1.0.0-SNAPSHOT
JAVA_VERSION=11 MVN_NAME: hello-world-service
SMARTGEARS_VERSION=4.0.1-SNAPSHOT MVN_FINALNAME: hello-world-service-1.0.0-SNAPSHOT
IMAGE_VERSION=${BUILD_VERSION}-java${JAVA_VERSION}-smartgears${SMARTGEARS_VERSION} JAVA_VERSION: 11
NAME=helloworld TOMCAT_VERSION: tomcat10.1.19
SMARTGEARS_VERSION: 4.0.1-SNAPSHOT
BUILD_NAME=$NAME:$IMAGE_VERSION CONTAINER_INI: ./dockerize/configuration/container.ini
HARBOR_IMAGE_NAME=hub.dev.d4science.org/gcube/$BUILD_NAME IMAGE_VERSION: 1.0.0-SNAPSHOT-java11-smartgears4.0.1-SNAPSHOT
DOCKER_IMAGE=$HARBOR_IMAGE_NAME DOCKER_BUILD_NAME: hello-world-service:1.0.0-SNAPSHOT-java11-smartgears4.0.1-SNAPSHOT
SMARTGEAR_IMAGE: hub.dev.d4science.org/gcube/smartgears-distribution:4.0.1-SNAPSHOT-java11-tomcat10.1.19
DOCKER_IMAGE_NAME: d4science/hello-world-service:1.0.0-SNAPSHOT-java11-smartgears4.0.1-SNAPSHOT
HARBOR_IMAGE_NAME: hub.dev.d4science.org/gcube/hello-world-service:1.0.0-SNAPSHOT-java11-smartgears4.0.1-SNAPSHOT

View File

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
set -a set -a
. ./docker.conf # source build_conf > docker.conf # generate current conf
docker pull $DOCKER_IMAGE # source docker.conf
source build_conf
echo "Docker image $DOCKER_IMAGE" docker pull $HARBOR_IMAGE_NAME
echo "Docker image $HARBOR_IMAGE_NAME"
set +a set +a

View File

@ -1,9 +1,12 @@
#!/bin/sh #!/bin/sh
set -a set -a
. ./docker.conf # source build_conf > docker.conf # generate current conf
echo "Docker image $DOCKER_IMAGE" # source docker.conf
docker pull $DOCKER_IMAGE source build_conf
docker run -d -p 9991:8080 --name $NAME $DOCKER_IMAGE
echo "Docker image $HARBOR_IMAGE_NAME"
docker pull $HARBOR_IMAGE_NAME
docker run -d -p 9991:8080 --name $NAME $HARBOR_IMAGE_NAME
set +a set +a

View File

@ -1,10 +1,11 @@
#!/bin/sh #!/bin/sh
set -a set -a
. ./docker.conf # source build_conf > docker.conf # generate current conf
# source docker.conf
source build_conf
docker stop $NAME docker stop $NAME
docker rm $NAME docker rm $NAME
set +a set +a