From 9b5e2cf27bcc23da4096c40b7369d0d43a4d90c6 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Thu, 26 Oct 2023 11:05:05 +0200 Subject: [PATCH] [FIX] Odoo 16.0: use dpkg to find build architecture As the docker-library doesn't use TARGETARCH yet, this commit set that variable by using `dpk --print-architecture` when the variable is not set. --- 16.0/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/16.0/Dockerfile b/16.0/Dockerfile index 680d765..1cbf51d 100644 --- a/16.0/Dockerfile +++ b/16.0/Dockerfile @@ -36,9 +36,12 @@ RUN apt-get update && \ python3-xlrd \ python3-xlwt \ xz-utils && \ + if [ -z "${TARGETARCH}" ]; then \ + TARGETARCH="$(dpkg --print-architecture)"; \ + fi; \ WKHTMLTOPDF_ARCH=${TARGETARCH} && \ case ${TARGETARCH} in \ - "amd64" | "") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \ + "amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \ "arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \ "ppc64le") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \ esac \