Added port as parameter

This commit is contained in:
Luca Frosini 2024-11-20 15:06:50 +01:00
parent 4d5e50d2d7
commit 3d4818dda7
2 changed files with 12 additions and 12 deletions

View File

@ -2,30 +2,27 @@
# --build-arg="MVN_FINALNAME=$MVN_FINALNAME" \
# --build-arg="MVN_NAME=${MVN_NAME}" \
# --build-arg="CONTAINER_INI=${CONTAINER_INI}" \
# --build-arg="JAVA_VERSION=${JAVA_VERSION}" \
# --build-arg="SMARTGEARS_VERSION=${SMARTGEARS_VERSION}" \
# --build-arg="SMARTGEAR_IMAGE=${SMARTGEAR_IMAGE}" \
# --build-arg="PORT=${PORT}" \
# -f Dockerfile \
# $PLATFORMS .
# ARG JAVA_VERSION
# ARG SMARTGEARS_VERSION
# ARG TOMCAT_VERSION
ARG SMARTGEAR_IMAGE
#FROM d4science/smartgears-distribution:${SMARTGEARS_VERSION}-java${JAVA_VERSION}-tomcat10.1.19
# FROM hub.dev.d4science.org/gcube/smartgears-distribution:${SMARTGEARS_VERSION}-java${JAVA_VERSION}-tomcat{TOMCAT_VERSION}
FROM ${SMARTGEAR_IMAGE}
ARG CONTAINER_INI="./dockerize/configuration/container.ini"
ARG CONTAINER_INI
ARG MVN_FINALNAME
ARG MVN_NAME
#FROM smartgears-distribution:${SMARTGEARS_VERSION}-java${JAVA_VERSION}-tomcat10.1.19
ARG PORT
COPY ./dockerize/configuration/logback.xml /etc/
COPY ./dockerize/configuration/*.gcubekey /tomcat/lib
COPY ./target/${MVN_FINALNAME}.war /usr/local/tomcat/webapps/
# In the case you have to copy a file inside the service directory
# the war must be unzipped .
# RUN unzip /target/${MVN_FINALNAME}.war -d /tomcat/webapps/${MVN_NAME}
COPY ${CONTAINER_INI} /etc/container.ini
EXPOSE 8080
EXPOSE ${PORT}

View File

@ -29,6 +29,9 @@ echo "JAVA_VERSION: ${JAVA_VERSION}"
TOMCAT_VERSION=10.1.19
echo "TOMCAT_VERSION: ${TOMCAT_VERSION}"
PORT=8080
echo "PORT: ${PORT}"
SMARTGEARS_VERSION=$(cd .. && mvn -q \
-Dexec.executable=echo \
-Dexec.args='${docker.smartgear.version}' \