dependabot-preview[bot] 2a0e888b00
Bump alfresco/alfresco-base-java (#352)
Bumps alfresco/alfresco-base-java from `e45f5e0` to `343c8f6`.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-08 10:32:38 +00:00

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:343c8f63cf80c7af51785b93d6972b0c00087a1c0b995098cb8285c4d9db74b5
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