blob: 48314eb856cc58b5cc45644dd3db172e0c9964d6 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
FROM tomcat:9-jdk8-openjdk
LABEL maintainer="Apache Hop Team"
ENV HOP_AES_ENCODER_KEY=
ENV HOP_AUDIT_FOLDER="${CATALINA_HOME}/webapps/ROOT/audit"
ENV HOP_CONFIG_FOLDER="${CATALINA_HOME}/webapps/ROOT/config"
# specify the hop log level
ENV HOP_LOG_LEVEL="Basic"
# any JRE settings you want to pass on
# The “-XX:+AggressiveHeap” tells the container to use all memory assigned to the container.
# this removed the need to calculate the necessary heap Xmx
ENV HOP_OPTIONS="-XX:+AggressiveHeap"
ENV HOP_PASSWORD_ENCODER_PLUGIN="Hop"
ENV HOP_PLUGIN_BASE_FOLDERS="plugins"
# path to jdbc drivers
ENV HOP_SHARED_JDBC_FOLDER=
ENV HOP_WEB_THEME="light"
# Set TOMCAT start variables
ENV CATALINA_OPTS='${HOP_OPTIONS} -DHOP_AES_ENCODER_KEY="${HOP_AES_ENCODER_KEY}" -DHOP_AUDIT_FOLDER="${HOP_AUDIT_FOLDER}" -DHOP_CONFIG_FOLDER="${HOP_CONFIG_FOLDER}" -DHOP_LOG_LEVEL="${HOP_LOG_LEVEL}" -DHOP_PASSWORD_ENCODER_PLUGIN="${HOP_PASSWORD_ENCODER_PLUGIN}" -DHOP_PLUGIN_BASE_FOLDERS="${HOP_PLUGIN_BASE_FOLDERS}" -DHOP_SHARED_JDBC_FOLDER="${HOP_SHARED_JDBC_FOLDER}" -DHOP_WEB_THEME="${HOP_WEB_THEME}"'
# Cleanup and create folder
RUN rm -rf webapps/* \
&& mkdir "${CATALINA_HOME}"/webapps/ROOT
# Copy resources
COPY ./assemblies/web/target/webapp/ "${CATALINA_HOME}"/webapps/ROOT/
COPY ./assemblies/plugins/dist/target/plugins "${CATALINA_HOME}"/plugins
COPY ./docker/resources/run-web.sh /tmp/
# Fix hop-config.json
RUN sed -i 's/config\/projects/${HOP_CONFIG_FOLDER}\/projects/g' "${CATALINA_HOME}"/webapps/ROOT/config/hop-config.json
CMD ["/bin/bash", "/tmp/run-web.sh"]