From 01992205e6e9954a650e875f70f481590ac25362 Mon Sep 17 00:00:00 2001 From: pi-farm Date: Sat, 27 Sep 2025 23:53:51 +0200 Subject: [PATCH] fix platforms --- scripts/image-builder.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/image-builder.sh b/scripts/image-builder.sh index 2f1dabd..faa5d56 100755 --- a/scripts/image-builder.sh +++ b/scripts/image-builder.sh @@ -665,22 +665,26 @@ build_image() { echo "====================================" >> "$logfile" # Plattformen zusammenstellen - local platforms="" - for arch in $architectures; do - case "$arch" in - amd64) platforms+="linux/amd64," ;; - arm64) platforms+="linux/arm64," ;; - armhf) platforms+="linux/arm/v7," ;; - x86) platforms+="linux/386," ;; - esac - done - platforms=${platforms%,} # letztes Komma entfernen - echo "DEBUG architectures='$architectures'" >> "$logfile" + # Architekturen in Docker-Platform-Syntax übersetzen +platforms="" +for arch in $architectures; do + case "$arch" in + amd64) platforms+="linux/amd64," ;; + arm64) platforms+="linux/arm64," ;; + armhf) platforms+="linux/arm/v7," ;; + x86) platforms+="linux/386," ;; + *) echo "WARNUNG: Unbekannte Architektur '$arch' wird ignoriert." >> "$logfile" ;; + esac +done - if [[ -z "$platforms" ]]; then - whiptail --msgbox "Keine Architekturen ausgewählt. Build abgebrochen." 10 60 - return - fi +# Letztes Komma abschneiden +platforms="${platforms%,}" +DEBUG architectures='amd64 arm64 armhf x86' + +if [[ -z "$platforms" ]]; then + echo "Keine Architektur ausgewählt. Build abgebrochen." | tee -a "$logfile" + return 1 +fi # Tags für alle registries zusammenstellen local tags=()