wisemapping-open-source/distribution/Dockerfile

38 lines
1.2 KiB
Docker
Raw Normal View History

# Dockerizing WiseMapping: Dockerfile for building WiseMapping images
# Based on ubuntu:latest, installs WiseMapping (http://ww.wisemapping.org)
2022-01-23 15:50:20 +08:00
# Based info setup ...
2023-06-30 11:11:48 +08:00
#FROM --platform=$BUILDPLATFORM tomcat:9.0.71-jdk17
2023-08-01 12:01:33 +08:00
FROM tomcat:10.1.11-jdk17
2022-01-23 15:50:20 +08:00
LABEL maintainer="Paulo Gustavo Veiga <pveiga@wisemapping.com>"
2022-01-24 06:55:07 +08:00
# Build variables ...
2022-01-23 15:50:20 +08:00
ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT"
2022-01-28 03:56:41 +08:00
ARG DB_BASE_DIR="/var/lib/wisemapping"
2022-01-24 06:55:07 +08:00
2022-02-28 01:02:41 +08:00
# Default ENV configurations ...
2022-04-11 20:51:15 +08:00
ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 -Dfile.encoding=UTF-8"
2022-02-04 11:08:24 +08:00
ENV database.base.url=${DB_BASE_DIR}
2022-01-23 15:50:20 +08:00
# Copy wisemapping distribution ...
COPY wisemapping.war /tmp
RUN mkdir ${WEBAPP_TARGET_DIR}
RUN cd ${WEBAPP_TARGET_DIR} && jar -xvf /tmp/wisemapping.war
RUN rm /tmp/wisemapping.war
# Change logger to
2023-08-01 12:01:33 +08:00
RUN cp ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j-stdout.xml ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j.xml
2022-01-23 15:50:20 +08:00
2022-02-28 01:02:41 +08:00
# Add support for proxy
RUN sed -i 's|\
</Host>|\
<Valve className="org.apache.catalina.valves.RemoteIpValve" \
remoteIpHeader="X-Forwarded-For" \
protocolHeader="X-Forwarded-Proto"/>\
</Host>|' \
/usr/local/tomcat/conf/server.xml
2022-01-23 15:50:20 +08:00
# Copy default HSQL DB for testing ...
2022-01-28 03:56:41 +08:00
RUN mkdir -p ${DB_BASE_DIR}/db
COPY db/ ${DB_BASE_DIR}/db