ACS-6450 Dynamically determine ARM64 LibreOffice download link (#923)

Dynamically determine ARM64 LibreOffice download link

Co-authored-by: Wojtek.Swieton <wojtek.swieton@hyland.com>
This commit is contained in:
mikolajbrzezinski 2024-02-13 09:23:39 +01:00 committed by GitHub
parent f5dba48808
commit aae8bb80a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View File

@ -17,8 +17,8 @@ ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-l
ARG LIBREOFFICE_VERSION=7.2.5 ARG LIBREOFFICE_VERSION=7.2.5
ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz
ENV LIBREOFFICE_ARM64_RPM_URL=https://dl.rockylinux.org/pub/rocky/8/Devel/aarch64/os/Packages/l/libreoffice-6.4.7.2-15.el8.aarch64.rpm ENV LIBREOFFICE_ARM64_RPM_URL=https://dl.rockylinux.org/pub/rocky/8/Devel/aarch64/os/Packages/l/
ENV LIBREOFFICE_ARM64_RPM_VERSION=libreoffice-6.4.7.2
ARG PDF_RENDERER_VERSION=1.2 ARG PDF_RENDERER_VERSION=1.2
ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/${PDF_RENDERER_VERSION}/alfresco-pdf-renderer-${PDF_RENDERER_VERSION}-linux.tgz ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/${PDF_RENDERER_VERSION}/alfresco-pdf-renderer-${PDF_RENDERER_VERSION}-linux.tgz
ENV ALFRESCO_PDF_RENDERER_ARM64_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/${PDF_RENDERER_VERSION}/alfresco-pdf-renderer-${PDF_RENDERER_VERSION}-linux-arm.tgz ENV ALFRESCO_PDF_RENDERER_ARM64_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/${PDF_RENDERER_VERSION}/alfresco-pdf-renderer-${PDF_RENDERER_VERSION}-linux-arm.tgz
@ -50,7 +50,8 @@ RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${
yum localinstall -y LibreOffice*/RPMS/*.rpm && \ yum localinstall -y LibreOffice*/RPMS/*.rpm && \
rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm; \ rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm; \
else \ else \
dnf --enablerepo=devel install -y $LIBREOFFICE_ARM64_RPM_URL && \ LIBREOFFICE_ARM64_RPM_VERSION=$(curl -s $LIBREOFFICE_ARM64_RPM_URL | grep -o "${LIBREOFFICE_ARM64_RPM_VERSION}.*" | cut -d '"' -f 1) && \
dnf --enablerepo=devel install -y ${LIBREOFFICE_ARM64_RPM_URL}${LIBREOFFICE_ARM64_RPM_VERSION} && \
update-alternatives --set java java-17-openjdk.aarch64; \ update-alternatives --set java java-17-openjdk.aarch64; \
fi && \ fi && \
if [ "$(uname -m)" = "x86_64" ]; then \ if [ "$(uname -m)" = "x86_64" ]; then \

View File

@ -7,7 +7,8 @@ FROM alfresco/alfresco-base-java:jre17-rockylinux8-202306121108
ARG LIBREOFFICE_VERSION=7.2.5 ARG LIBREOFFICE_VERSION=7.2.5
ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/${LIBREOFFICE_VERSION}/libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz
ENV LIBREOFFICE_ARM64_RPM_URL=https://dl.rockylinux.org/pub/rocky/8/Devel/aarch64/os/Packages/l/libreoffice-6.4.7.2-15.el8.aarch64.rpm ENV LIBREOFFICE_ARM64_RPM_URL=https://dl.rockylinux.org/pub/rocky/8/Devel/aarch64/os/Packages/l/
ENV LIBREOFFICE_ARM64_RPM_VERSION=libreoffice-6.4.7.2
ENV JAVA_OPTS="" ENV JAVA_OPTS=""
# Set default user information # Set default user information
@ -28,7 +29,8 @@ RUN ln /${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.proj
yum localinstall -y LibreOffice*/RPMS/*.rpm && \ yum localinstall -y LibreOffice*/RPMS/*.rpm && \
rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm; \ rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm; \
else \ else \
dnf --enablerepo=devel install -y $LIBREOFFICE_ARM64_RPM_URL && \ LIBREOFFICE_ARM64_RPM_VERSION=$(curl -s $LIBREOFFICE_ARM64_RPM_URL | grep -o "${LIBREOFFICE_ARM64_RPM_VERSION}.*" | cut -d '"' -f 1) && \
dnf --enablerepo=devel install -y ${LIBREOFFICE_ARM64_RPM_URL}${LIBREOFFICE_ARM64_RPM_VERSION} && \
update-alternatives --set java java-17-openjdk.aarch64; \ update-alternatives --set java java-17-openjdk.aarch64; \
fi && \ fi && \
yum clean all yum clean all