Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2821 Add arm64 support for pdfrenderer tengine #43

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ target "tengine_aio" {
}
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-transform-core-aio:${TAG}"]
output = ["type=docker"]
platforms = [ "linux/amd64" ]
platforms = split(",", "${TARGETARCH}")
}

variable "ALFRESCO_MSTEAMS_USER_NAME" {
Expand Down
4 changes: 2 additions & 2 deletions tengine/aio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ ARG DISTRIB_MAJOR
ARG TARGETARCH

RUN --mount=type=bind,source=/,target=/dist \
[ "$TARGETARCH" == 'arm64' ] && export PKGARCH='-aarch64'; \
[ "$TARGETARCH" == 'arm64' ] && export PKGARCH='-aarch64' PDFARCH='-arm'; \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${DISTRIB_MAJOR}.noarch.rpm && \
yum install -y cairo cups-libs libSM libGLU perl-Image-ExifTool && \
mkdir /tmp/dist && \
yum localinstall -y /dist/imagemagick/imagemagick-distribution*-el${DISTRIB_MAJOR}${PKGARCH}.rpm /dist/imagemagick/libs/imagemagick-distribution*-libs-el${DISTRIB_MAJOR}${PKGARCH}.rpm && \
tar xzf /dist/pdfrenderer/*.tgz -C /usr/bin && \
tar xzf /dist/pdfrenderer/*-linux${PDFARCH}.tgz -C /usr/bin alfresco-pdf-renderer && \
if [ "$TARGETARCH" == 'arm64' ]; then \
yum --enablerepo=devel install -y libreoffice && \
update-alternatives --set java java-17-openjdk.aarch64; \
Expand Down
4 changes: 3 additions & 1 deletion tengine/pdfrenderer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ ARG ALFRESCO_PDFRENDERER_GROUP_NAME
ARG ALFRESCO_PDFRENDERER_GROUP_ID
ARG ALFRESCO_PDFRENDERER_USER_NAME
ARG ALFRESCO_PDFRENDERER_USER_ID
ARG TARGETARCH

RUN --mount=type=bind,source=/,target=/dist \
tar xzf /dist/*.tgz -C /usr/bin && \
[ "$TARGETARCH" == 'arm64' ] && export PDFARCH='-arm'; \
tar xzf /dist/*-linux${PDFARCH}.tgz -C /usr/bin alfresco-pdf-renderer && \
yum clean all

ADD alfresco-transform-pdf-renderer*.jar /opt/app.jar
Expand Down
8 changes: 8 additions & 0 deletions tengine/pdfrenderer/artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
"repository": "releases",
"group": "org.alfresco"
},
{
"name": "alfresco-pdf-renderer",
"version": "1.2",
"path": "tengine/pdfrenderer",
"classifier": "-linux-arm.tgz",
"repository": "releases",
"group": "org.alfresco"
},
{
"name": "alfresco-transform-pdf-renderer",
"version": "5.1.3",
Expand Down