diff --git a/Docker Files/yellowfinAllInOne/Dockerfile b/Docker Files/yellowfinAllInOne/Dockerfile index 84c63f4..3660d8d 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 <