This issue has been created
There are 6 updates, 2 comments.
 
 
XWiki Docker images / cid:jira-generated-image-avatar-ccb9674d-f32f-41ad-a66e-88d7fb4a41ca XDOCKER-421 Closed

The Docker image fails to build without BuildKit because TARGETARCH is empty

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-0344df25-d45c-4d1a-b24c-ac8bb1ff8513 Vincent Massol created this issue on 29/Jul/26 12:54
 
Summary: The Docker image fails to build without BuildKit because TARGETARCH is empty
Issue Type: cid:jira-generated-image-avatar-ccb9674d-f32f-41ad-a66e-88d7fb4a41ca Bug
Assignee: Unassigned
Created: 29/Jul/26 12:54
Priority: cid:jira-generated-image-static-major-edaf99df-8595-4343-8b1a-b85c3d4bfc71 Major
Reporter: Vincent Massol
Description:

Problem

The Dockerfile installs a controlled LibreOffice version and selects the download matching the image
architecture by branching on the TARGETARCH build argument.

TARGETARCH is only populated automatically by BuildKit. The Docker Official Images build
infrastructure uses the classic builder, where an ARG TARGETARCH declaration with no
--build-arg yields an empty value. The architecture selection therefore falls into its error branch
and the build fails:

Step 14/33 : RUN case "$TARGETARCH" in     amd64) ...
Unsupported target architecture [] for the LibreOffice installation

This broke the Docker Hub update for XWiki 18.6.0: all three 18-* variants failed to build. The
same failure happens to any user building the image locally with BuildKit disabled
(DOCKER_BUILDKIT=0).

All generated Dockerfile}}s are affected. Only the {{18 ones failed so far because the other cycles
are still published from commits predating the LibreOffice installation step; bumping any of them
would fail the same way.

Fix

Read the architecture from the image itself with dpkg --print-architecture instead of relying on a
build argument. This is the approach Docker Official Images recommends, it yields the same
amd64/arm64 values, and it works whether or not BuildKit is in use.

 
 

6 updates

 
cid:jira-generated-image-avatar-0344df25-d45c-4d1a-b24c-ac8bb1ff8513 Changes by Vincent Massol on 29/Jul/26 12:56
 
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Vincent Massol
Resolution: Fixed
Status: Open Closed
Labels: regression
 
 

2 comments

 
cid:jira-generated-image-avatar-0344df25-d45c-4d1a-b24c-ac8bb1ff8513 Vincent Massol on 29/Jul/26 12:59
 

This is a regression caused by https://github.com/xwiki/xwiki-docker/commit/0e44b95a554bf6c1a13b679a73b551dcac6c8ca4 ie XDOCKER-157

 
cid:jira-generated-image-avatar-0344df25-d45c-4d1a-b24c-ac8bb1ff8513 Vincent Massol on 29/Jul/26 13:04
 

Fixed in https://github.com/xwiki/xwiki-docker/pull/97