Skip to content

Commit 4f1871d

Browse files
committed
[UPDT] Implement the arch compatibility for 15.0
1 parent c8297f5 commit 4f1871d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

15.0/Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
66
# Generate locale C.UTF-8 for postgres and general locale data
77
ENV LANG C.UTF-8
88

9+
# Retrieve the target architecture to install the correct wkhtmltopdf package
10+
ARG TARGETARCH
11+
912
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
1013
RUN apt-get update && \
1114
apt-get install -y --no-install-recommends \
@@ -30,9 +33,18 @@ RUN apt-get update && \
3033
python3-watchdog \
3134
python3-xlrd \
3235
python3-xlwt \
33-
xz-utils \
34-
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \
35-
&& echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - \
36+
xz-utils && \
37+
if [ -z "${TARGETARCH}" ]; then \
38+
TARGETARCH="$(dpkg --print-architecture)"; \
39+
fi; \
40+
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
41+
case ${TARGETARCH} in \
42+
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
43+
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
44+
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \
45+
esac \
46+
&& 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 \
47+
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
3648
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
3749
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
3850

0 commit comments

Comments
 (0)