Skip to content

Commit 9b5e2cf

Browse files
committed
[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.
1 parent 8a93c61 commit 9b5e2cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

16.0/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ RUN apt-get update && \
3636
python3-xlrd \
3737
python3-xlwt \
3838
xz-utils && \
39+
if [ -z "${TARGETARCH}" ]; then \
40+
TARGETARCH="$(dpkg --print-architecture)"; \
41+
fi; \
3942
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
4043
case ${TARGETARCH} in \
41-
"amd64" | "") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
44+
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
4245
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
4346
"ppc64le") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \
4447
esac \

0 commit comments

Comments
 (0)