Skip to content

Commit

Permalink
ACS-5039 - Code review changes. Change to one imagemagick download pa…
Browse files Browse the repository at this point in the history
…th and delete redundant
  • Loading branch information
wojtekswieton committed Jul 13, 2023
1 parent 2d4cdfd commit 2f4efcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
10 changes: 3 additions & 7 deletions engines/aio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ ARG EXIFTOOL_FOLDER=Image-ExifTool-${EXIFTOOL_VERSION}
ARG EXIFTOOL_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/exiftool/image-exiftool/${EXIFTOOL_VERSION}/image-exiftool-${EXIFTOOL_VERSION}.tgz

ARG IMAGEMAGICK_VERSION=7.1.0-16
ENV IMAGEMAGICK_RPM_URL_AMD64=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL_AMD64=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
ENV IMAGEMAGICK_RPM_URL_ARM64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-arm64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL_ARM64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-arm64-libs.rpm
ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

ARG LIBREOFFICE_VERSION=7.2.5
Expand All @@ -38,11 +35,10 @@ COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \
yum install -y $IMAGEMAGICK_DEP_RPM_URL && \
if [ "$(uname -m)" = "x86_64" ]; then \
yum install -y $IMAGEMAGICK_LIB_RPM_URL_AMD64 $IMAGEMAGICK_RPM_URL_AMD64; \
yum install -y ${IMAGEMAGICK_RPM_URL}-el8.rpm ${IMAGEMAGICK_RPM_URL}-el8-libs.rpm; \
else \
yum install -y $IMAGEMAGICK_LIB_RPM_URL_ARM64 $IMAGEMAGICK_RPM_URL_ARM64; \
yum install -y ${IMAGEMAGICK_RPM_URL}-arm64.rpm ${IMAGEMAGICK_RPM_URL}-arm64-libs.rpm; \
fi && \
rpm -qa | grep libgs && rpm -e --nodeps libgs || echo "libgs package not found" && \
yum install -y cairo cups-libs libSM libGLU && \
if [ "$(uname -m)" = "x86_64" ]; then \
test -f libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz && \
Expand Down
13 changes: 1 addition & 12 deletions engines/imagemagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,7 @@ FROM alfresco/alfresco-base-java:jre17-rockylinux8-202302221525
ARG IMAGEMAGICK_VERSION=7.1.0-16

ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3
#ENV IMAGEMAGICK_RPM_URL_AMD64=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
#ENV IMAGEMAGICK_RPM_URL_AMD64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-el8.rpm

#ENV IMAGEMAGICK_LIB_RPM_URL_AMD64=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
#ENV IMAGEMAGICK_LIB_RPM_URL_AMD64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-el8-libs.rpm

#ENV IMAGEMAGICK_RPM_URL_ARM64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-arm64.rpm
#ENV IMAGEMAGICK_LIB_RPM_URL_ARM64=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/${IMAGEMAGICK_VERSION}-ci-3/imagemagick-distribution-${IMAGEMAGICK_VERSION}-ci-3-arm64-libs.rpm

ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

ENV JAVA_OPTS=""

# Set default user information
Expand All @@ -36,8 +26,7 @@ RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${
else \
yum install -y ${IMAGEMAGICK_RPM_URL}-arm64.rpm ${IMAGEMAGICK_RPM_URL}-arm64-libs.rpm; \
fi && \
yum clean all && \
rpm -qa | grep libgs && rpm -e --nodeps libgs || echo "libgs package not found"
yum clean all

ADD target/generated-resources/licenses /licenses
ADD target/generated-resources/licenses.xml /licenses/
Expand Down

0 comments on commit 2f4efcf

Please sign in to comment.