-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from mcneilco/735-apache-tomcat-upgrade
fixes #735 apache tomcat upgrade to patch vulnerabilities
- Loading branch information
Showing
3 changed files
with
39 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
FROM mcneilco/tomcat-maven:openjdk8 | ||
ARG CHEMISTRY_PACKAGE=jchem | ||
ARG TOMCAT_IMAGE=mcneilco/tomcat-maven:1.3-openjdk8 | ||
|
||
FROM ${TOMCAT_IMAGE} as dependencies | ||
ARG CHEMISTRY_PACKAGE | ||
ENV CHEMISTRY_PACKAGE=${CHEMISTRY_PACKAGE} | ||
|
||
FROM dependencies as jchem | ||
ADD lib/jchem-16.4.25.0.jar /lib/jchem-16.4.25.0.jar | ||
RUN mvn install:install-file -Dfile=/lib/jchem-16.4.25.0.jar -DartifactId=jchem -DgroupId=com.chemaxon -Dversion=16.4.25.0 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true | ||
|
||
FROM dependencies as indigo | ||
|
||
FROM ${CHEMISTRY_PACKAGE} as compile | ||
WORKDIR /src | ||
ENV CATALINA_HOME /usr/local/tomcat | ||
ENV PATH $CATALINA_HOME/bin:$PATH | ||
ADD pom.xml /src/pom.xml | ||
ADD lib/jchem-16.4.25.0.jar /lib/jchem-16.4.25.0.jar | ||
RUN ["mvn", "install:install-file","-Dfile=/lib/jchem-16.4.25.0.jar","-DartifactId=jchem","-DgroupId=com.chemaxon","-Dversion=16.4.25.0","-Dpackaging=jar","-DgeneratePom=true","-DcreateChecksum=true"] | ||
RUN ["mvn", "dependency:resolve", "-P", "default"] | ||
RUN ["mvn", "clean"] | ||
ADD . /src | ||
RUN mvn compile war:war -P default | ||
RUN mv target/acas*.war $CATALINA_HOME/webapps/acas.war | ||
RUN mv target/acas* $CATALINA_HOME/webapps/acas | ||
RUN rm -rf /src | ||
WORKDIR $CATALINA_HOME | ||
EXPOSE 8080 | ||
CMD ["catalina.sh", "run"] | ||
RUN mvn dependency:resolve-plugins | ||
RUN mvn dependency:resolve -P ${CHEMISTRY_PACKAGE} | ||
ADD . /src | ||
RUN mvn clean && \ | ||
mvn compile war:war -P ${CHEMISTRY_PACKAGE} && \ | ||
mv target/acas*.war $CATALINA_HOME/webapps/acas.war && \ | ||
mv target/acas* $CATALINA_HOME/webapps/acas | ||
|
||
FROM ${TOMCAT_IMAGE} as build | ||
COPY --from=compile /src/target/acas*.war $CATALINA_HOME/webapps/acas/ $CATALINA_HOME/webapps/acas.war | ||
COPY --from=compile /src/target/acas* $CATALINA_HOME/webapps/acas/ $CATALINA_HOME/webapps/acas | ||
WORKDIR $CATALINA_HOME | ||
EXPOSE 8080 | ||
CMD ["catalina.sh", "run"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters