dockerfile con versione parametrica

This commit is contained in:
Alfredo Oliviero 2024-05-07 18:20:47 +02:00
parent 9d52aef7cb
commit dcecfe224c
1 changed files with 7 additions and 5 deletions

View File

@ -1,8 +1,10 @@
ARG JAVA_VERSION=11
FROM tomcat:10.1.19-jdk$JAVA_VERSION-temurin-jammy
ARG filename=smartgears-distribution-4.0.0-SNAPSHOT
ARG version=4.0.0-SNAPSHOT
COPY ./target/$filename.tar.gz /smartgears-distro.tar.gz
FROM tomcat:10.1.19-jdk${JAVA_VERSION}-temurin-jammy
ARG SMARTGEARS_VERSION=""
ENV FILENAME=smartgears-distribution-${SMARTGEARS_VERSION}
COPY ./target/${FILENAME}.tar.gz /smartgears-distro.tar.gz
WORKDIR /
# all file and folder in etc/config are moved to the smartgears applications configuration directory
# for specific application configuration ( configuration file for app with contextPath "contextPath" must be placed in /etc/config/contextPath)
@ -11,7 +13,7 @@ FROM tomcat:10.1.19-jdk$JAVA_VERSION-temurin-jammy
RUN rm /smartgears-distro.tar.gz
RUN export CATALINA_HOME=/usr/local/tomcat
RUN ln -s /usr/local/tomcat tomcat
RUN mv smartgears-distribution-$version smartgears-distribution
RUN mv smartgears-distribution-$SMARTGEARS_VERSION smartgears-distribution
ENV GHN_HOME=./smartgears-distribution
RUN ./smartgears-distribution/install -s tomcat
COPY tomcat_files/startContainer.sh /startContainer.sh