dockerize - update JDK from 1.6 to 1.8. Because of reasons. - use (adoptopen)JDK 14 to build and run - tomcat 9 TODO: static port 8080
diff --git a/UnicodeJsps/.dockerignore b/UnicodeJsps/.dockerignore new file mode 100644 index 0000000..74db7e6 --- /dev/null +++ b/UnicodeJsps/.dockerignore
@@ -0,0 +1,2 @@ +/build +/Dockerfile \ No newline at end of file
diff --git a/UnicodeJsps/Dockerfile b/UnicodeJsps/Dockerfile new file mode 100644 index 0000000..ee9f2ac --- /dev/null +++ b/UnicodeJsps/Dockerfile
@@ -0,0 +1,23 @@ +# Copyright (c) 2020 and later Unicode, Inc. and others. All Rights Reserved. +# Use -eJDKVERSION=13 -eTOMCATVERSION=8 for example to change these +ARG JDKVERSION=14 +FROM openjdk:${JDKVERSION}-alpine AS build +# Need ant, add it. Yes, this pulls in JDK8, but it's an easier +# way to manage this. +RUN apk add --update apache-ant +# Some version of tomcat. Just used for API, does not have to match TOMCATVERSION +ARG TOMCAT_API=http://apache.mirrors.hoobly.com/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz +RUN mkdir -p /usr/local/lib && cd /usr/local/lib/ && wget ${TOMCAT_API} -O - | tar xfpz - && ln -svf apache-tomcat-* ./tomcat + +WORKDIR /home +ADD . /home/ +ENV CATALINA_HOME /usr/local/lib/tomcat +RUN ant -DCATALINA_HOME=${CATALINA_HOME} war + +# ARG TOMCATVERSION=9 +# Was not able to parameterize this +FROM tomcat:9-jdk${JDKVERSION}-openjdk-slim-buster AS run +# FROM tomcat:9-jdk14-openjdk-slim-buster AS run +COPY --from=build /home/UnicodeJsps.war /usr/local/tomcat/webapps/ +# TODO PORT! We do not support the PORT variable to control the port. +EXPOSE 8080
diff --git a/UnicodeJsps/build.xml b/UnicodeJsps/build.xml index 4760b3f..c6de962 100644 --- a/UnicodeJsps/build.xml +++ b/UnicodeJsps/build.xml
@@ -193,7 +193,7 @@ additionalparam="${doc.params}" link="http://java.sun.com/j2se/1.5/docs/api" bottom="<font size=-1><a target='_top' href='http://www.unicode.org/copyright.html'>Copyright &copy; 2004-${current.year} Unicode, Inc. All Rights Reserved.</a></font>" - source="1.6" /> + source="1.8" /> </target> <!-- bottom="<font size=-1>Copyright (c) ${current.year} IBM Corporation and others.</font>" --> @@ -214,8 +214,8 @@ srcdir="${src.dir}" destdir="${build.dir}" classpathref="project.class.path" - source="1.6" - target="1.6" + source="1.8" + target="1.8" debug="on" deprecation="off" encoding="UTF-8"/> <copy todir="${build.dir}/org/unicode/jsp/">