From 5a08c122d298281c14ecd3f79ecb91817416ff6d Mon Sep 17 00:00:00 2001 From: Viktor Petersson Date: Sat, 2 May 2026 17:24:40 +0000 Subject: [PATCH] fix(upgrade): pin docker pull platform off DEVICE_TYPE Docker 29.4.x on Trixie has been observed advertising `linux/arm/v8` (32-bit ARMv8) as the host platform on aarch64 Pi 4 hosts, which doesn't match the single-platform `linux/arm64/v8` manifest we publish for `pi4-64` and breaks `docker compose pull` with "no matching manifest for linux/arm/v8". We already derive the correct platform from `/proc/device-tree/model`, so set DOCKER_DEFAULT_PLATFORM explicitly off DEVICE_TYPE rather than relying on Docker's host auto-detect. Co-Authored-By: Claude Opus 4.7 (1M context) --- bin/upgrade_containers.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/upgrade_containers.sh b/bin/upgrade_containers.sh index 65c2ebdbd..40d3594f5 100755 --- a/bin/upgrade_containers.sh +++ b/bin/upgrade_containers.sh @@ -53,6 +53,19 @@ else exit 1 fi +# Pin the pull platform off DEVICE_TYPE rather than letting Docker +# auto-detect from the host. Docker 29.4.x on Trixie has been observed +# advertising `linux/arm/v8` (32-bit ARMv8) on aarch64 Pi 4 hosts, which +# doesn't match the single-platform `linux/arm64/v8` manifest we publish +# for `pi4-64` and breaks `docker compose pull`. We already know the +# correct platform from DEVICE_TYPE, so just set it explicitly. `-E` +# below propagates this into the sudo'd `docker compose` invocations. +case "$DEVICE_TYPE" in + pi5|pi4-64) export DOCKER_DEFAULT_PLATFORM="linux/arm64" ;; + pi3|pi2) export DOCKER_DEFAULT_PLATFORM="linux/arm/v7" ;; + x86) export DOCKER_DEFAULT_PLATFORM="linux/amd64" ;; +esac + if [[ -n $(docker ps | grep srly-ose) ]]; then # @TODO: Rename later set +e