fix platforms

This commit is contained in:
2025-09-27 23:53:51 +02:00
parent 2c218904ff
commit 01992205e6

View File

@@ -665,22 +665,26 @@ build_image() {
echo "====================================" >> "$logfile" echo "====================================" >> "$logfile"
# Plattformen zusammenstellen # Plattformen zusammenstellen
local platforms="" # Architekturen in Docker-Platform-Syntax übersetzen
for arch in $architectures; do platforms=""
case "$arch" in for arch in $architectures; do
amd64) platforms+="linux/amd64," ;; case "$arch" in
arm64) platforms+="linux/arm64," ;; amd64) platforms+="linux/amd64," ;;
armhf) platforms+="linux/arm/v7," ;; arm64) platforms+="linux/arm64," ;;
x86) platforms+="linux/386," ;; armhf) platforms+="linux/arm/v7," ;;
esac x86) platforms+="linux/386," ;;
done *) echo "WARNUNG: Unbekannte Architektur '$arch' wird ignoriert." >> "$logfile" ;;
platforms=${platforms%,} # letztes Komma entfernen esac
echo "DEBUG architectures='$architectures'" >> "$logfile" done
if [[ -z "$platforms" ]]; then # Letztes Komma abschneiden
whiptail --msgbox "Keine Architekturen ausgewählt. Build abgebrochen." 10 60 platforms="${platforms%,}"
return DEBUG architectures='amd64 arm64 armhf x86'
fi
if [[ -z "$platforms" ]]; then
echo "Keine Architektur ausgewählt. Build abgebrochen." | tee -a "$logfile"
return 1
fi
# Tags für alle registries zusammenstellen # Tags für alle registries zusammenstellen
local tags=() local tags=()