From 77d4b938a602330d6d72ec93487456650063dc71 Mon Sep 17 00:00:00 2001 From: Victor Carlos Erenu Date: Wed, 29 Apr 2026 23:11:51 +0700 Subject: [PATCH] Change image build process --- build-docker-images/build-images.sh | 2 +- build-docker-images/docker-bake.hcl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build-docker-images/build-images.sh b/build-docker-images/build-images.sh index 817007a9..d15ac821 100755 --- a/build-docker-images/build-images.sh +++ b/build-docker-images/build-images.sh @@ -96,7 +96,7 @@ build() { # Pattern: server / stage / major_version.x / filename FULL_URL="https://${PACKAGE_URL}/${RELEASE_STAGE}/${WAZUH_MAJOR_VERSION}.x/${ARTIFACT_URLS_DIR}/${ARTIFACT_URLS_DOWNLOAD}" echo "Attempting to download: $FULL_URL" - curl -fsSL -o "$ARTIFACT_URLS_FILE" "$FULL_URL" || { + curl -so "$ARTIFACT_URLS_FILE" "$FULL_URL" || { echo "Error: Failed to download artifact URLs from $FULL_URL" >&2 clean 1 } diff --git a/build-docker-images/docker-bake.hcl b/build-docker-images/docker-bake.hcl index d27b79ca..73c041c7 100644 --- a/build-docker-images/docker-bake.hcl +++ b/build-docker-images/docker-bake.hcl @@ -53,7 +53,9 @@ group "default" { # All component targets inherit from here. Not built directly. target "_common" { - platforms = MULTIARCH != "" ? ["linux/amd64", "linux/arm64"] : ["linux/amd64"] + # MULTIARCH=true → build linux/amd64 + linux/arm64 (requires --push, no --load for multi-platform) + # MULTIARCH unset → null means "native platform of the build host" (amd64 on x86, arm64 on ARM) + platforms = MULTIARCH != "" ? ["linux/amd64", "linux/arm64"] : null args = { WAZUH_VERSION = WAZUH_VERSION }