mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-05-12 17:04:48 +00:00
* ATS-863: Update to latest Java Base Image on CentOS 8 (& Open JDK 11.0.10) - to resolve 2 medium (at time of writing) in quay.io - update to CentOS 7 to 8 (aligned with Repo decision) * ATS-863: Update to latest Java Base Image on CentOS 8 (& Open JDK 11.0.10) - to resolve 2 medium (at time of writing) in quay.io - update to CentOS 7 to 8 (aligned with Repo decision) - also update ImageMagick from 7.0.10-11 to 7.0.10-59 - see also ACS-1174
45 lines
2.1 KiB
Docker
45 lines
2.1 KiB
Docker
# Image provides a container in which to run LibreOffice transformations for Alfresco Content Services.
|
|
|
|
# LibreOffice is from The Document Foundation. See the license at https://www.libreoffice.org/download/license/ or in /libreoffice.txt.
|
|
|
|
FROM alfresco/alfresco-base-java:11.0.10-openjdk-centos-8@sha256:f498c3106940e6fccc5d52e6c3e6e8ff237a3ad689bf737b2ca6fdff1a2109cc
|
|
|
|
ARG LIBREOFFICE_VERSION=6.3.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_LICENSE_FILE=https://github.com/Alfresco/acs-community-packaging/blob/master/distribution/src/main/resources/licenses/3rd-party/libreoffice.txt
|
|
ENV JAVA_OPTS=""
|
|
|
|
# Set default user information
|
|
ARG GROUPNAME=Alfresco
|
|
ARG GROUPID=1000
|
|
ARG LIBREUSERNAME=libreoffice
|
|
ARG USERID=33003
|
|
|
|
COPY target/${env.project_artifactId}-${env.project_version}.jar libreoffice-dist-*-linux.gz /
|
|
|
|
RUN ln /${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \
|
|
yum install -y cairo cups-libs libSM && \
|
|
test -f libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz && \
|
|
ln -s libreoffice-dist-${LIBREOFFICE_VERSION}-linux.gz libreoffice-dist-linux.gz || \
|
|
curl -s -S $LIBREOFFICE_RPM_URL -o libreoffice-dist-linux.gz && \
|
|
curl -s -S $LIBREOFFICE_LICENSE_FILE -o libreoffice.txt && \
|
|
tar xzf libreoffice-dist-linux.gz && \
|
|
yum localinstall -y LibreOffice*/RPMS/*.rpm && \
|
|
rm -rf libreoffice-dist-*linux.gz LibreOffice_*_Linux_x86-64_rpm && \
|
|
yum clean all
|
|
|
|
ADD target/generated-resources/licenses /licenses
|
|
ADD target/generated-resources/licenses.xml /licenses/
|
|
ADD target/generated-sources/license/THIRD-PARTY.txt /licenses/
|
|
|
|
RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
|
|
useradd -u ${USERID} -G ${GROUPNAME} ${LIBREUSERNAME} && \
|
|
chgrp -R ${GROUPNAME} /usr/bin/${env.project_artifactId}.jar
|
|
|
|
EXPOSE 8090
|
|
|
|
USER ${LIBREUSERNAME}
|
|
|
|
ENTRYPOINT java $JAVA_OPTS -jar /usr/bin/${env.project_artifactId}.jar
|