[UPDT] Implement the arch compatibility for 15.0

This commit is contained in:
Adam Bonnet 2024-07-25 11:50:57 +02:00
parent c8297f5332
commit 4f1871d109
No known key found for this signature in database
GPG Key ID: 7E38EC64CF23BA4D

View File

@ -6,6 +6,9 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data # Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8 ENV LANG C.UTF-8
# Retrieve the target architecture to install the correct wkhtmltopdf package
ARG TARGETARCH
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
@ -30,9 +33,18 @@ RUN apt-get update && \
python3-watchdog \ python3-watchdog \
python3-xlrd \ python3-xlrd \
python3-xlwt \ python3-xlwt \
xz-utils \ xz-utils && \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \ if [ -z "${TARGETARCH}" ]; then \
&& echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - \ TARGETARCH="$(dpkg --print-architecture)"; \
fi; \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \
esac \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_${WKHTMLTOPDF_ARCH}.deb \
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \ && apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb && rm -rf /var/lib/apt/lists/* wkhtmltox.deb