[REF] Odoo 16.0: Add support of ppc64le and arm64

This commit is contained in:
Ludovic Gasc 2023-07-26 17:56:46 +02:00 committed by Christophe Monniez
parent d04d885eea
commit d98cfdf610

View File

@ -6,6 +6,9 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data
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
RUN apt-get update && \
apt-get install -y --no-install-recommends \
@ -32,9 +35,15 @@ RUN apt-get update && \
python3-watchdog \
python3-xlrd \
python3-xlwt \
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 \
&& echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - \
xz-utils && \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64" | "") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
"ppc64le") 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 \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb