mstrankowski e78709631f Moving all images including AIO to rocky linux 8,
moving generated RPMs of ImageMagick to Nexus
There is an issue to resolve on rocky linux where removal of perl-ExtUtils-MakeMaker removes exiftool - causes Tika tests to fail. Leaving it for tests
2022-07-29 17:56:54 +02:00

49 lines
1.8 KiB
Docker

# Image provides a container in which to run Tika transformations for Alfresco Content Services.
# Tika is from Apache. See the license at http://www.apache.org/licenses/LICENSE-2.0.
FROM alfresco/alfresco-base-java:jre11-rockylinux8-202207110835
ARG EXIFTOOL_VERSION=12.25
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
ENV JAVA_OPTS=""
# Set default user information
ARG GROUPNAME=Alfresco
ARG GROUPID=1000
ARG TIKAUSERNAME=tika
ARG USERID=33004
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 && \
curl -s -S $EXIFTOOL_URL -o ${EXIFTOOL_FOLDER}.tgz && \
tar xzf ${EXIFTOOL_FOLDER}.tgz && \
yum -y install perl perl-ExtUtils-MakeMaker make && \
(cd ./${EXIFTOOL_FOLDER} && \
perl Makefile.PL && \
make && \
make test && \
make install) && \
yum -y autoremove make && \
#TODO perl-ExtUtils-MakeMaker removal removes exiftools
rm -rf ${EXIFTOOL_FOLDER} ${EXIFTOOL_FOLDER}.tgz #&& \
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/
COPY src/main/resources/licenses/3rd-party/ /
RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
useradd -u ${USERID} -G ${GROUPNAME} ${TIKAUSERNAME} && \
chgrp -R ${GROUPNAME} /usr/bin/${env.project_artifactId}.jar
EXPOSE 8090
USER ${TIKAUSERNAME}
ENTRYPOINT java $JAVA_OPTS -jar /usr/bin/${env.project_artifactId}.jar