Skip to content

Commit

Permalink
Merge pull request #2885 from hansva/master
Browse files Browse the repository at this point in the history
Simplify the Hop Web image including beam, fixes #2884
  • Loading branch information
hansva committed Apr 28, 2023
2 parents ee9486d + 62d2712 commit d289b88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
46 changes: 2 additions & 44 deletions docker/Dockerfile.web-fatjar
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit d289b88

Please sign in to comment.