From 62d271215b5295dad1d89c1800c56bdacee6b061 Mon Sep 17 00:00:00 2001 From: Hans Van Akelyen Date: Fri, 28 Apr 2023 16:00:05 +0200 Subject: [PATCH] Simplify the Hop Web image including beam, fixes #2884 --- Jenkinsfile | 2 +- docker/Dockerfile.web-fatjar | 46 ++---------------------------------- 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f628272df12..08ba9118073 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -162,7 +162,7 @@ pipeline { //Base docker image sh "docker buildx build --platform linux/amd64,linux/arm64 . -f docker/Dockerfile.web -t ${DOCKER_REPO_WEB}:${env.POM_VERSION} -t ${DOCKER_REPO_WEB}:Development --push" //Image including fat-jar - sh "docker buildx build --platform linux/amd64,linux/arm64 . -f docker/Dockerfile.web-fatjar -t ${DOCKER_REPO_WEB}:${env.POM_VERSION}-beam -t ${DOCKER_REPO_WEB}:Development-beam --push" + sh "docker buildx build --build-arg HOP_WEB_VERSION=Development --platform linux/amd64,linux/arm64 . -f docker/Dockerfile.web-fatjar -t ${DOCKER_REPO_WEB}:${env.POM_VERSION}-beam -t ${DOCKER_REPO_WEB}:Development-beam --push" sh "docker buildx rm hop" } } diff --git a/docker/Dockerfile.web-fatjar b/docker/Dockerfile.web-fatjar index 5f093c8ecdb..968747c6346 100644 --- a/docker/Dockerfile.web-fatjar +++ b/docker/Dockerfile.web-fatjar @@ -16,52 +16,10 @@ # under the License. # -FROM tomcat:9-jdk11-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" -ENV HOP_GUI_ZOOM_FACTOR=1.0 - -# 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}" \ - -DHOP_GUI_ZOOM_FACTOR="${HOP_GUI_ZOOM_FACTOR}"' - -# 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 +ARG HOP_WEB_VERSION=latest +FROM apache/hop-web:${HOP_WEB_VERSION} # Copy the fatjar to hop-web COPY ./assemblies/client/target/hop-fatjar.jar /root/hop-fatjar.jar -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 - -RUN mkdir -p "$CATALINA_HOME"/lib/swt/linux/x86_64 - CMD ["/bin/bash", "/tmp/run-web.sh"]