Skip to content

fix(upgrade): pin docker pull platform off DEVICE_TYPE#2814

Closed
vpetersson wants to merge 1 commit intomasterfrom
fix/upgrade-containers-platform-pin
Closed

fix(upgrade): pin docker pull platform off DEVICE_TYPE#2814
vpetersson wants to merge 1 commit intomasterfrom
fix/upgrade-containers-platform-pin

Conversation

@vpetersson
Copy link
Copy Markdown
Contributor

Issues Fixed

Reported on a Pi 4 running 64-bit Raspberry Pi OS Trixie with Docker Engine 29.4.2:

$ docker compose pull
Error response from daemon: no matching manifest for linux/arm/v8 in the manifest list entries: no match for platform in manifest: not found

uname -m is aarch64, dpkg --print-architecture is arm64, docker info reports Architecture: aarch64, and the GHCR manifest for latest-pi4-64 exposes a clean arm64/linux entry — yet the daemon requests linux/arm/v8 (32-bit ARMv8) and fails to match. docker pull --platform linux/arm64 … succeeds, confirming this is host-platform auto-detect on Docker 29.4.x mis-classifying the host.

Description

bin/upgrade_containers.sh already derives DEVICE_TYPE from /proc/device-tree/model, so we know the correct platform without trusting Docker's host detection. Set DOCKER_DEFAULT_PLATFORM explicitly:

  • pi4-64, pi5linux/arm64
  • pi2, pi3linux/arm/v7
  • x86linux/amd64

The existing sudo -E docker compose pull propagates the export. No build-pipeline / image-builder change needed — the published manifests are correct.

Checklist

  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally and on CI with my changes.
  • I have done an end-to-end test for Raspberry Pi devices.
  • I have tested my changes for x86 devices.
  • I added a documentation for the changes I have made (when necessary).

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) <noreply@anthropic.com>
@vpetersson vpetersson self-assigned this May 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@vpetersson vpetersson marked this pull request as ready for review May 2, 2026 17:28
@vpetersson vpetersson requested a review from a team as a code owner May 2, 2026 17:28
@vpetersson
Copy link
Copy Markdown
Contributor Author

Superseded by the ansible-side fix on `fix/ansible-docker-arch-reconciliation` (PR coming).

Diagnosis got further than this PR: the `linux/arm/v8` platform error wasn't a Docker host-detection bug, it was a downstream symptom of `docker-ce:armhf` getting installed on aarch64 Pi 4 hosts. Root cause is a regression introduced in #2779 — the Trixie upgrade renamed `DEVICE_TYPE` from `pi4` to `pi4-64` in `bin/install.sh` / `bin/upgrade_containers.sh` / `ansible/site.yml` validator, but missed the conditional in `ansible/roles/system/tasks/docker.yml`, which still checks `device_type in ['pi4', 'pi5']`. Every Pi 4 host that ran `bin/run_upgrade.sh` after #2779 merged on 2026-04-30 had its docker-ce silently swapped from arm64 to armhf — confirmed via apt history on a live device (arm64 install on 2026-04-28, armhf re-install on 2026-05-02).

This PR's `DOCKER_DEFAULT_PLATFORM` pin would only have worked around the manifest match step; the seccomp filter on an armhf daemon would still SIGSYS containers at runtime regardless. Ansible-side fix is the correct layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant