From 5ce7bb5bb9e95dcfd55437f2caed4920cd54db66 Mon Sep 17 00:00:00 2001 From: alandavis Date: Thu, 15 Aug 2019 21:26:28 +0100 Subject: [PATCH] REPO-4589 Configure Mimetypes for custom renditions (#288) - Create extension directories in Docker image - Remove external executables from docker image now community has T-Engines --- docker-alfresco/Dockerfile | 70 ++++---------------------------------- pom.xml | 6 ++-- 2 files changed, 10 insertions(+), 66 deletions(-) diff --git a/docker-alfresco/Dockerfile b/docker-alfresco/Dockerfile index 01452dc5e4..85af0389d4 100644 --- a/docker-alfresco/Dockerfile +++ b/docker-alfresco/Dockerfile @@ -11,49 +11,6 @@ ARG USERID=33000 # Set default environment args ARG TOMCAT_DIR=/usr/local/tomcat -# Base ACS Repository Image includes transformation commands: -# /usr/bin/alfresco-pdf-renderer - alfresco-pdf-renderer -# /usr/bin/convert - imagemagick -# /opt/libreoffice5.4/program/soffice - LibreOffice - -# alfresco-pdf-renderer uses the PDFium library from Google Inc. See the license at https://pdfium.googlesource.com/pdfium/+/master/LICENSE or in /pdfium.txt -# ImageMagick is from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt -# LibreOffice is from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt - -ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/1.1/alfresco-pdf-renderer-1.1-linux.tgz -ENV PDFIUM_LICENSE_FILE=https://github.com/Alfresco/acs-community-packaging/blob/master/distribution/src/main/resources/licenses/3rd-party/pdfium.txt - -ENV LIBREOFFICE_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/libreoffice/libreoffice-dist/6.1.6/libreoffice-dist-6.1.6-linux.gz -ENV LIBREOFFICE_LICENSE_FILE=https://github.com/Alfresco/acs-community-packaging/blob/master/distribution/src/main/resources/licenses/3rd-party/libreoffice.txt - -ENV IMAGEMAGICK_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/7.0.7-27/imagemagick-distribution-7.0.7-27-linux.rpm -ENV IMAGEMAGICK_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/thirdparty/content/org/imagemagick/imagemagick-distribution/7.0.7-27/imagemagick-distribution-7.0.7-27-libs-linux.rpm -ENV IMAGEMAGICK_LICENSE_FILE=https://github.com/Alfresco/acs-community-packaging/blob/master/distribution/src/main/resources/licenses/3rd-party/ImageMagick-license.txt - -# Install transformer binaries -RUN yum install wget -y && \ - \ - wget $ALFRESCO_PDF_RENDERER_LIB_RPM_URL && \ - wget -P /. $PDFIUM_LICENSE_FILE && \ - tar xf alfresco-pdf-renderer-*-linux.tgz -C /usr/bin && \ - rm -f alfresco-pdf-renderer-*-linux.tgz && \ - \ - yum install -y cairo cups-libs libSM && \ - wget $LIBREOFFICE_RPM_URL && \ - wget -P /. $LIBREOFFICE_LICENSE_FILE && \ - tar xzf libreoffice-dist-*-linux.gz && \ - yum localinstall -y LibreOffice*/RPMS/*.rpm && \ - rm -rf libreoffice-dist-*-linux.gz LibreOffice_*_Linux_x86-64_rpm && \ - \ - wget $IMAGEMAGICK_RPM_URL && \ - wget $IMAGEMAGICK_LIB_RPM_URL && \ - wget -P /. $IMAGEMAGICK_LICENSE_FILE && \ - yum localinstall -y imagemagick-distribution-*-linux.rpm && \ - rm -f imagemagick-distribution-*-linux.rpm && \ - \ - yum clean all &&\ - \ - yum remove wget -y # Create prerequisite to store tools and properties RUN mkdir -p ${TOMCAT_DIR}/shared/classes/alfresco/extension && \ @@ -76,27 +33,14 @@ COPY target/licenses/ /licenses/ # shared.loader=${catalina.base}/shared/classes RUN sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/" ${TOMCAT_DIR}/conf/catalina.properties -# Add here configurations for alfresco-global.properties -RUN echo -e '\n\ -alfresco-pdf-renderer.root=/usr/bin/\n\ -alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer\n\ -\n\ -jodconverter.enabled=true\n\ -jodconverter.portNumbers=8100\n\ -jodconverter.officeHome=/opt/libreoffice6.1/\n\ -\n\ -img.root=/usr/lib64/ImageMagick-7.0.7\n\ -img.coders=/usr/lib64/ImageMagick-7.0.7/modules-Q16HDRI/coders\n\ -img.config=/usr/lib64/ImageMagick-7.0.7/config-Q16HDRI\n\ -img.exe=/usr/bin/convert\n\ -' >> ${TOMCAT_DIR}/shared/classes/alfresco-global.properties +RUN mkdir -p ${TOMCAT_DIR}/amps \ + ${TOMCAT_DIR}/shared/classes/alfresco/extension/mimetypes \ + ${TOMCAT_DIR}/shared/classes/alfresco/extension/transform/renditions \ + ${TOMCAT_DIR}/shared/classes/alfresco/extension/transform/pipelines -# Add debug for testing -# RUN echo -e '\n\ -# log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=debug\n\ -# ' >> ${TOMCAT_DIR}/shared/classes/alfresco/extension/custom-log4j.properties - -RUN mkdir -p ${TOMCAT_DIR}/amps +#RUN echo -e '\n\ +#log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=debug\n\ +#' >> ${TOMCAT_DIR}/shared/classes/alfresco/extension/custom-log4j.propertiesRUN mkdir -p ${TOMCAT_DIR}/amps # Copy the amps from build context to the appropriate location for your application server COPY target/amps ${TOMCAT_DIR}/amps diff --git a/pom.xml b/pom.xml index d0de59f154..a12c0fd057 100644 --- a/pom.xml +++ b/pom.xml @@ -62,9 +62,9 @@ Community latest - 7.78 - 7.105 - 8.47 + 7.80 + 7.107 + 8.48 7.21 1.0.11