forked from agois-inc/js-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-cmdline-pro
69 lines (53 loc) · 3.37 KB
/
Dockerfile-cmdline-pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright (c) 2020. TIBCO Software Inc.
# This file is subject to the license terms contained
# in the license file that is distributed with this file.
# set certified JRE image version for the
# JasperReports Server command line tools
# for JasperReports Server 7.5
# ARG JAVA_BASE_IMAGE=amazoncorretto:11
ARG JAVA_BASE_IMAGE=openjdk:11.0-slim
FROM ${JAVA_BASE_IMAGE}
ARG POSTGRES_JDBC_DRIVER_VERSION
ARG JASPERREPORTS_SERVER_VERSION
ARG EXPLODED_INSTALLER_DIRECTORY
ENV POSTGRES_JDBC_DRIVER_VERSION ${POSTGRES_JDBC_DRIVER_VERSION:-42.2.5}
ENV JASPERREPORTS_SERVER_VERSION ${JASPERREPORTS_SERVER_VERSION:-7.5.0}
ENV EXPLODED_INSTALLER_DIRECTORY ${EXPLODED_INSTALLER_DIRECTORY:-resources/jasperreports-server-pro-$JASPERREPORTS_SERVER_VERSION-bin}
# This Dockerfile requires an exploded JasperReports Server WAR file installer file
# in the resources directory below the Dockerfile.
# COPY the buildomatic, command line scripts and supporting resources
# from the JasperReports Server WAR file installer into the image
RUN mkdir -p /usr/src/jasperreports-server
# Ant
COPY ${EXPLODED_INSTALLER_DIRECTORY}/apache-ant /usr/src/jasperreports-server/apache-ant/
# js-ant script, Ant XMLs and supporting resources in bin
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/js-ant /usr/src/jasperreports-server/buildomatic/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/js-*.sh /usr/src/jasperreports-server/buildomatic/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/*.xml /usr/src/jasperreports-server/buildomatic/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/*.sh /usr/src/jasperreports-server/buildomatic/bin/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/*.xml /usr/src/jasperreports-server/buildomatic/bin/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/*.help /usr/src/jasperreports-server/buildomatic/bin/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/app-server /usr/src/jasperreports-server/buildomatic/bin/app-server/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/bin/groovy /usr/src/jasperreports-server/buildomatic/bin/groovy/
# supporting resources
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/jdbc-dep /usr/src/jasperreports-server/buildomatic/bin/jdbc-dep/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/install_resources /usr/src/jasperreports-server/buildomatic/install_resources/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/conf_source /usr/src/jasperreports-server/buildomatic/conf_source/
COPY ${EXPLODED_INSTALLER_DIRECTORY}/buildomatic/target /usr/src/jasperreports-server/buildomatic/target/
COPY scripts /
RUN echo "apt-get" && \
echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null && \
chmod +x /*.sh && \
/installPackagesForJasperserver-pro-cmdline.sh && \
echo "finished installing packages" && \
cp -R /buildomatic /usr/src/jasperreports-server/buildomatic && \
rm /installPackagesForJasperserver*.sh && rm -rf /buildomatic && \
chmod +x /usr/src/jasperreports-server/buildomatic/js-* && \
chmod +x /usr/src/jasperreports-server/buildomatic/bin/*.sh && \
chmod +x /usr/src/jasperreports-server/apache-ant/bin/* && \
java -version && \
wget "https://jdbc.postgresql.org/download/postgresql-${POSTGRES_JDBC_DRIVER_VERSION}.jar" \
-P /usr/src/jasperreports-server/buildomatic/conf_source/db/postgresql/jdbc --no-verbose
ENTRYPOINT ["/entrypoint-cmdline.sh"]
# Default action executed by entrypoint script.
CMD ["init"]