From 28e160ed5989b335e7e8f2370a98eb4c1c1748d1 Mon Sep 17 00:00:00 2001 From: Peter Damen Date: Thu, 24 Jul 2025 11:13:56 +1000 Subject: [PATCH 1/3] Dockerfile refactor, Upgrade to Java 21 and multi-arch support - Upgrade bundled Java to Zulu Java 21. - Refactor docker file to use inline RUN and COPY commands - Add architecture detection to support amd64 and arm64 --- Docker Files/yellowfinAllInOne/Dockerfile | 134 +++++++++++++--------- Docker Files/yellowfinAppOnly/Dockerfile | 71 ++++++++---- 2 files changed, 128 insertions(+), 77 deletions(-) diff --git a/Docker Files/yellowfinAllInOne/Dockerfile b/Docker Files/yellowfinAllInOne/Dockerfile index 84c63f4..578a43d 100644 --- a/Docker Files/yellowfinAllInOne/Dockerfile +++ b/Docker Files/yellowfinAllInOne/Dockerfile @@ -27,19 +27,40 @@ FROM ubuntu:24.04 LABEL maintainer="Yellowfin " LABEL description="Yellowfin All-In-One" +ARG TARGETPLATFORM # Timezone setup ENV TZ=Etc/GMT -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# Install OS applications required for application installation and setup Java -RUN apt-get update -y && apt-get upgrade -y && apt-get install -y unzip tar curl sed fonts-dejavu \ - fontconfig liboss4-salsa-asound2 libglib2.0-0 postgresql-16 sudo libpangoft2-1.0-0 -y - -#Configure Java 11 using Zulu 11 JDK -RUN mkdir /usr/lib/jvm -p && cd /usr/lib/jvm/ && curl -o zulu11.tar.gz https://cdn.azul.com/zulu/bin/zulu11.72.19-ca-fx-jdk11.0.23-linux_x64.tar.gz \ -&& tar -xzvf zulu11.tar.gz && mv zulu11.72* zulu11-jdk/ && rm zulu11.tar.gz -ENV JAVA_HOME=/usr/lib/jvm/zulu11-jdk/ +RUN < /etc/timezone + + #Install OS applications required for application installation and setup Java + apt-get update -y + apt-get upgrade -y + apt-get install -y unzip tar curl sed fonts-dejavu fontconfig liboss4-salsa-asound2 libglib2.0-0 postgresql-16 sudo libpangoft2-1.0-0 -y +EOT + +RUN < /tmp/silent-install.properties \ -&& echo InstallTutorialDatabase=true >> /tmp/silent-install.properties \ -&& echo ServicePort=8080 >> /tmp/silent-install.properties \ -&& echo InstallService=false >> /tmp/silent-install.properties \ -&& echo DatabaseType=PostgreSQL >> /tmp/silent-install.properties \ -&& echo CreateYellowfinDB=true >> /tmp/silent-install.properties \ -&& echo CreateYellowfinDBUser=false >> /tmp/silent-install.properties \ -&& echo DatabaseHostname=localhost >> /tmp/silent-install.properties \ -&& echo DatabaseName=yellowfin >> /tmp/silent-install.properties \ -&& echo DatabasePort=5432 >> /tmp/silent-install.properties \ -&& echo AppMemory=2048 >> /tmp/silent-install.properties \ -&& echo DatabaseDBAUser=yellowfindba >> /tmp/silent-install.properties \ -&& echo DatabaseDBAPassword=yellowfin >> /tmp/silent-install.properties \ -&& echo DatabaseUser=yellowfindba >> /tmp/silent-install.properties \ -&& echo DatabasePassword=yellowfin >> /tmp/silent-install.properties \ -&& cat /tmp/silent-install.properties +COPY < user_setup.sql \ -&& sudo -u postgres psql < user_setup.sql \ -&& echo "Installing Yellowfin" && java -jar /tmp/yellowfin.jar -silent /tmp/silent-install.properties \ -&& echo "Stopping PostgreSQL" && pg_ctlcluster 16 main stop \ -&& echo "Cleaning up files" && rm /tmp/yellowfin.jar - +RUN < user_setup.sql + sudo -u postgres psql < user_setup.sql + echo "Installing Yellowfin" + + #Install Yellowfin + mkdir -p /opt/yellowfin && chmod a+w /opt/yellowfin + java -jar /tmp/yellowfin.jar -silent /tmp/silent-install.properties + echo "Stopping PostgreSQL" + pg_ctlcluster 16 main stop + echo "Cleaning up files" + rm /tmp/yellowfin.jar /user_setup.sql + + #Mark management scripts as executable + chmod +x /opt/yellowfin/appserver/bin/catalina.sh /opt/yellowfin/appserver/bin/startup.sh /opt/yellowfin/appserver/bin/shutdown.sh +EOT -# Mark management scripts as executable -RUN chmod +x /opt/yellowfin/appserver/bin/catalina.sh /opt/yellowfin/appserver/bin/startup.sh /opt/yellowfin/appserver/bin/shutdown.sh ####################################################################################################### # Prepare Yellowfin Launcher @@ -112,14 +140,14 @@ RUN chmod +x /opt/yellowfin/appserver/bin/catalina.sh /opt/yellowfin/appserver/b # Create docker-entry file, that starts PostgreSQL and then Yellowfin -RUN echo pg_ctlcluster 16 main start > /opt/docker-entry.sh \ -&& echo "echo Over-ride Memory: \$APP_MEMORY" >> /opt/docker-entry.sh \ -&& echo "if [ ! -z \"\${APP_MEMORY}\" ]; then " >> /opt/docker-entry.sh \ -&& echo " sed -i 's/-Xmx2048m/-Xmx'\"\$APP_MEMORY\"'m/g' /opt/yellowfin/appserver/bin/catalina.sh " >> /opt/docker-entry.sh \ -&& echo fi >> /opt/docker-entry.sh \ -&& echo java -cp \"/opt/yellowfin/appserver/webapps/ROOT/WEB-INF/lib/*\" com.hof.standalone.ModifyConfiguration jdbcuser:yellowfindba jdbcpassword:yellowfin jdbcurl:jdbc:postgresql://localhost:5432/yellowfin >> /opt/docker-entry.sh \ -&& echo /opt/yellowfin/appserver/bin/catalina.sh run >> /opt/docker-entry.sh - - +COPY < /etc/timezone - -# Install OS applications required for application installation and setup Java -RUN apt-get update -y && apt-get upgrade -y && apt-get install -y unzip tar curl sed fonts-dejavu \ - fontconfig liboss4-salsa-asound2 libglib2.0-0 libpangoft2-1.0-0 -y && echo "fs.file-max = 10240" >> /etc/sysctl.conf - -#Configure Java 11 using Zulu 11 JDK -RUN mkdir /usr/lib/jvm -p && cd /usr/lib/jvm/ && curl -o zulu11.tar.gz https://cdn.azul.com/zulu/bin/zulu11.72.19-ca-fx-jdk11.0.23-linux_x64.tar.gz \ -&& tar -xzvf zulu11.tar.gz && mv zulu11.72* zulu11-jdk/ && rm zulu11.tar.gz -ENV JAVA_HOME=/usr/lib/jvm/zulu11-jdk/ -ENV PATH="$JAVA_HOME/bin:$PATH" +RUN < /etc/timezone + +#Install OS applications required for application installation and setup Java +apt-get update -y +apt-get upgrade -y +apt-get install -y unzip tar curl sed fonts-dejavu fontconfig liboss4-salsa-asound2 libglib2.0-0 libpangoft2-1.0-0 -y +EOT + + +RUN < Date: Thu, 24 Jul 2025 11:50:19 +1000 Subject: [PATCH 2/3] Dockerfile refactor, Upgrade to Java 21 and multi-arch support - Indent inline RUN commands for better readability --- Docker Files/yellowfinAppOnly/Dockerfile | 64 ++++++++++++------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/Docker Files/yellowfinAppOnly/Dockerfile b/Docker Files/yellowfinAppOnly/Dockerfile index b386579..c065f5e 100644 --- a/Docker Files/yellowfinAppOnly/Dockerfile +++ b/Docker Files/yellowfinAppOnly/Dockerfile @@ -74,30 +74,30 @@ ARG TARGETPLATFORM ENV TZ=Etc/GMT RUN < /etc/timezone - -#Install OS applications required for application installation and setup Java -apt-get update -y -apt-get upgrade -y -apt-get install -y unzip tar curl sed fonts-dejavu fontconfig liboss4-salsa-asound2 libglib2.0-0 libpangoft2-1.0-0 -y + #Setup OS Packages + #Apply Timezone + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + + #Install OS applications required for application installation and setup Java + apt-get update -y + apt-get upgrade -y + apt-get install -y unzip tar curl sed fonts-dejavu fontconfig liboss4-salsa-asound2 libglib2.0-0 libpangoft2-1.0-0 -y EOT RUN < Date: Wed, 15 Oct 2025 11:27:40 +1100 Subject: [PATCH 3/3] Docker in-line formatting and multi-arch support - Support aarch64 and amd64 - Apply in-line formatting for --- Docker Files/yellowfinAllInOne/Dockerfile | 4 ++-- Docker Files/yellowfinAppOnly/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Docker Files/yellowfinAllInOne/Dockerfile b/Docker Files/yellowfinAllInOne/Dockerfile index 578a43d..3660d8d 100644 --- a/Docker Files/yellowfinAllInOne/Dockerfile +++ b/Docker Files/yellowfinAllInOne/Dockerfile @@ -50,8 +50,8 @@ RUN <