1212# Certified version of Tomcat for JasperReports Server 7.5.0 commercial editions
1313# ARG TOMCAT_BASE_IMAGE=tomcat:9.0-jdk11-corretto
1414
15- ARG TOMCAT_BASE_IMAGE=tomcat:9.0.27-jdk11-openjdk
15+ # Certified version of Tomcat for JasperReports Server 7.8.0 commercial editions
16+ # ARG TOMCAT_BASE_IMAGE=tomcat:9.0.37-jdk11-corretto
17+
18+ ARG TOMCAT_BASE_IMAGE=tomcat:9.0.37-jdk11-openjdk
1619FROM ${TOMCAT_BASE_IMAGE}
1720
1821ARG DN_HOSTNAME
1922ARG KS_PASSWORD
2023ARG JRS_HTTPS_ONLY
2124ARG HTTP_PORT
2225ARG HTTPS_PORT
26+ ARG JAVASCRIPT_RENDERING_ENGINE
2327ARG POSTGRES_JDBC_DRIVER_VERSION
2428ARG JASPERREPORTS_SERVER_VERSION
2529ARG EXPLODED_INSTALLER_DIRECTORY
2630
27- ENV PHANTOMJS_VERSION ${PHANTOMJS_VERSION:-2.1.1}
2831ENV DN_HOSTNAME ${DN_HOSTNAME:-localhost.localdomain}
2932ENV KS_PASSWORD ${KS_PASSWORD:-changeit}
30- ENV JRS_HTTPS_ONLY ${JRS_HTTPS_ONLY:-false}
31- ENV HTTP_PORT ${HTTP_PORT:-8080}
32- ENV HTTPS_PORT ${HTTPS_PORT:-8443}
33+ ENV JRS_HTTPS_ONLY ${JRS_HTTPS_ONLY:-false}
34+ ENV HTTP_PORT ${HTTP_PORT:-8080}
35+ ENV HTTPS_PORT ${HTTPS_PORT:-8443}
36+ ENV JAVASCRIPT_RENDERING_ENGINE ${JAVASCRIPT_RENDERING_ENGINE:-chromium}
37+
3338ENV POSTGRES_JDBC_DRIVER_VERSION ${POSTGRES_JDBC_DRIVER_VERSION:-42.2.5}
34- ENV JASPERREPORTS_SERVER_VERSION ${JASPERREPORTS_SERVER_VERSION:-7.5.1 }
39+ ENV JASPERREPORTS_SERVER_VERSION ${JASPERREPORTS_SERVER_VERSION:-7.8.0 }
3540ENV EXPLODED_INSTALLER_DIRECTORY ${EXPLODED_INSTALLER_DIRECTORY:-resources/jasperreports-server-pro-$JASPERREPORTS_SERVER_VERSION-bin}
3641
37- # This Dockerfile requires an exploded JasperReports Server WAR file installer file
42+ # This Dockerfile requires an exploded JasperReports Server WAR file installer file
3843# EXPLODED_INSTALLER_DIRECTORY (default jasperreports-server-bin/) directory below the Dockerfile.
3944
40- RUN mkdir -p /usr/src/jasperreports-server
41-
42- # get the WAR and license
45+ # deploy the WAR to Tomcat
4346COPY ${EXPLODED_INSTALLER_DIRECTORY}/jasperserver-pro $CATALINA_HOME/webapps/jasperserver-pro/
47+
48+ # copy copyright notices
4449COPY ${EXPLODED_INSTALLER_DIRECTORY}/TIB* /usr/src/jasperreports-server/
4550
4651# Ant
@@ -55,42 +60,24 @@ COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/groovy /usr/src/jasperrepor
5560
5661# supporting resources
5762COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/conf_source /usr/src/jasperreports-server/buildomatic/conf_source/
58- COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/target /usr/src/jasperreports-server/buildomatic/target /
63+ COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/lib /usr/src/jasperreports-server/buildomatic/lib /
5964
60- COPY scripts /
65+ # js-docker specific scripts and resources
66+ COPY scripts /usr/src/jasperreports-server/scripts/
6167
62- RUN echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null && \
63- chmod +x /*.sh && \
64- /installPackagesForJasperserver-pro.sh > /dev/null && \
65- echo "finished installing packages" && \
68+ RUN chmod +x /usr/src/jasperreports-server/scripts/*.sh && \
69+ /usr/src/jasperreports-server/scripts/installPackagesForJasperserver-pro.sh && \
6670 rm -rf $CATALINA_HOME/webapps/ROOT && \
6771 rm -rf $CATALINA_HOME/webapps/docs && \
6872 rm -rf $CATALINA_HOME/webapps/examples && \
6973 rm -rf $CATALINA_HOME/webapps/host-manager && \
7074 rm -rf $CATALINA_HOME/webapps/manager && \
7175 #
72- cp -R /buildomatic /usr/src/jasperreports-server/buildomatic && \
73- rm /installPackagesForJasperserver*.sh && rm -rf /buildomatic && \
76+ cp -R /usr/src/jasperreports-server/scripts/buildomatic /usr/src/jasperreports-server/buildomatic && \
7477 chmod +x /usr/src/jasperreports-server/buildomatic/js-* && \
7578 chmod +x /usr/src/jasperreports-server/apache-ant/bin/* && \
7679 java -version && \
77- # Extract phantomjs, move to /usr/local/share/phantomjs, link to /usr/local/bin.
78- # Comment out if phantomjs not required.
79- wget "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2" \
80- -O /tmp/phantomjs.tar.bz2 --no-verbose && \
81- tar -xjf /tmp/phantomjs.tar.bz2 -C /tmp && \
82- rm -f /tmp/phantomjs.tar.bz2 && \
83- mv /tmp/phantomjs*linux-x86_64 /usr/local/share/phantomjs && \
84- ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
85- # In case you wish to download from a different location you can manually
86- # download the archive and copy from resources/ at build time. Note that you
87- # also # need to comment out the preceding RUN command
88- # COPY resources/phantomjs*bz2 /tmp/phantomjs.tar.bz2
89- # RUN tar -xjf /tmp/phantomjs.tar.bz2 -C /tmp && \
90- # rm -f /tmp/phantomjs.tar.bz2 && \
91- # mv /tmp/phantomjs*linux-x86_64 /usr/local/share/phantomjs && \
92- # ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
93- rm -rf /tmp/* && \
80+ # rm -rf /tmp/* && \
9481 #
9582 wget "https://jdbc.postgresql.org/download/postgresql-${POSTGRES_JDBC_DRIVER_VERSION}.jar" \
9683 -P /usr/src/jasperreports-server/buildomatic/conf_source/db/postgresql/jdbc --no-verbose && \
@@ -102,12 +89,12 @@ RUN echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null && \
10289 -storetype PKCS12 \
10390 -storepass "${KS_PASSWORD}" \
10491 -keypass "${KS_PASSWORD}" \
105- -keystore /root /.keystore.p12 && \
106- keytool -list -keystore /root /.keystore.p12 -storepass "${KS_PASSWORD}" -storetype PKCS12 && \
107- xmlstarlet ed --inplace --subnode "/Server/Service" --type elem \
92+ -keystore $CATALINA_HOME/conf /.keystore.p12 && \
93+ keytool -list -keystore $CATALINA_HOME/conf /.keystore.p12 -storepass "${KS_PASSWORD}" -storetype PKCS12 && \
94+ xmlstarlet ed --inplace --subnode "/Server/Service" --type elem \
10895 -n Connector -v "" --var connector-ssl '$prev' \
10996 --insert '$connector-ssl' --type attr -n port -v "${HTTPS_PORT}" \
110- --insert '$connector-ssl' --type attr -n protocol -v \
97+ --insert '$connector-ssl' --type attr -n protocol -v \
11198 "org.apache.coyote.http11.Http11NioProtocol" \
11299 --insert '$connector-ssl' --type attr -n maxThreads -v "150" \
113100 --insert '$connector-ssl' --type attr -n SSLEnabled -v "true" \
@@ -118,15 +105,15 @@ RUN echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null && \
118105 --insert '$connector-ssl' --type attr -n keystorePass \
119106 -v "${KS_PASSWORD}" \
120107 --insert '$connector-ssl' --type attr -n keystoreFile \
121- -v "/root /.keystore.p12" \
108+ -v "$CATALINA_HOME/conf /.keystore.p12" \
122109 ${CATALINA_HOME}/conf/server.xml
123110
124111# Expose ports. Note that you must do one of the following:
125112# map them to local ports at container runtime via "-p 8080:8080 -p 8443:8443"
126113# or use dynamic ports.
127114EXPOSE ${HTTP_PORT} ${HTTPS_PORT}
128115
129- ENTRYPOINT ["/entrypoint.sh" ]
116+ ENTRYPOINT ["/usr/src/jasperreports-server/scripts/ entrypoint.sh" ]
130117
131118# Default action executed by entrypoint script.
132119CMD ["run" ]
0 commit comments