docker-buildx-latest-download-asset-404-saved-as-plugin
The exact helper extracted from the markdown runs and installs both working plugins. Here's the summary.
Root cause fully confirmed against live GitHub:
https://github.com/docker/buildx/releases/latest/download/docker-buildx-linux-x86_64 → HTTP 404, body Not Found (9 bytes). Buildx publishes only version-prefixed assets like buildx-v0.37.1.linux-amd64.curl -sSL -o docker-buildx "$URL" && chmod +x without -f exits 0 on 404, saves the text body, and grades the install OK. Docker execs plugins directly, so the text file fails with ENOEXEC → exec format error.docker/compose's latest/download URL currently returns 200, so only buildx breaks — but it carries the same latent trap.Two extra gotchas discovered during verification (not in the incident report):
docker-compose-linux-x86_64), not Go labels (amd64). Reusing go_arch() for compose produces a 404 even after tag resolution — so separate maps are required.head -c 4 | grep -q '^ELF' never matches, because the ELF magic's first byte is 0x7f. My first draft had this bug; the correct gate compares hex magic 7f454c46 (an unanchored grep -q ELF also works).Resolve the tag via the GitHub API, fetch the version-prefixed asset with curl -fsSL, verify ELF magic, and atomically mv only after verification. Applied identically to buildx and compose.
-f aborts and writes nothing.v0.37.1; version-prefixed URL returns 200 and the binary reports its version.7f454c46, buildx v0.37.1, compose v5.5.1.fetch_elf → rc=1, existing file preserved, zero temp files.~/docker-buildx-404-solution.md — self-contained write-up: symptom, root cause, reusable hardened bootstrap helper, minimal one-off, and verification.~/install-docker-plugins.sh — runnable version of the helper (verified end-to-end).# Evidence - Problem class: docker-buildx-latest-download-asset-404-saved-as-plugin - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-21T06:21:29.859Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Docker buildx publishes NO versionless latest/download release asset (asset names are version-prefixed: buildx-vX.Y.Z.linux-amd64), so https://github.com/docker/buildx/releases/latest/download/docker-buildx-linux-x86_64 returns 404 with body 'Not Found'. A bootstrap that runs `curl -sSL -o <plugin> <url> && chmod +x` without -f silently saves the 404 body as the plugin binary, marks the install OK, and compose build later dies with 'fork/exec .../docker-buildx: exec format error'. FIX: resolve the tag via the GitHub API (https://api.github.com/repos/docker/buildx/releases/latest, jq/grep tag_name), download https://github.com/docker/buildx/releases/download/$TAG/buildx-$TAG.linux-amd64, use curl -fsSL so HTTP errors never land in the file, and verify ELF magic (head -c 4 | grep -q ELF) before grading the install OK. Same -f+ELF hardening should apply to any sibling plugin download (docker-compose latest/download works today but carries the same latent trap).", "environment": "bunker-qa.sh JIT agent harness (bash, static docker-28.5.2.tgz toolchain, user-space ~/.docker/cli-plugins install, GitHub releases download)", "language": "bash", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "docker-buildx-latest-download-asset-404-saved-as-plugin", "provider": "openrouter", "solved_at": "2026-09-21T06:21:29.860Z", "version": "harness 2026-09-21"}The exact helper extracted from the markdown runs and installs both working plugins. Here's the summary.
Root cause fully confirmed against live GitHub:
https://github.com/docker/buildx/releases/latest/download/docker-buildx-linux-x86_64 → HTTP 404, body Not Found (9 bytes). Buildx publishes only version-prefixed assets like buildx-v0.37.1.linux-amd64.curl -sSL -o docker-buildx "$URL" && chmod +x without -f exits 0 on 404, saves the text body, and grades the install OK. Docker execs plugins directly, so the text file fails with ENOEXEC → exec format error.docker/compose's latest/download URL currently returns 200, so only buildx breaks — but it carries the same latent trap.Two extra gotchas discovered during verification (not in the incident report):
docker-compose-linux-x86_64), not Go labels (amd64). Reusing go_arch() for compose produces a 404 even after tag resolution — so separate maps are required.head -c 4 | grep -q '^ELF' never matches, because the ELF magic's first byte is 0x7f. My first draft had this bug; the correct gate compares hex magic 7f454c46 (an unanchored grep -q ELF also works).Resolve the tag via the GitHub API, fetch the version-prefixed asset with curl -fsSL, verify ELF magic, and atomically mv only after verification. Applied identically to buildx and compose.
-f aborts and writes nothing.v0.37.1; version-prefixed URL returns 200 and the binary reports its version.7f454c46, buildx v0.37.1, compose v5.5.1.fetch_elf → rc=1, existing file preserved, zero temp files.~/docker-buildx-404-solution.md — self-contained write-up: symptom, root cause, reusable hardened bootstrap helper, minimal one-off, and verification.~/install-docker-plugins.sh — runnable version of the helper (verified end-to-end).# Evidence - Problem class: docker-buildx-latest-download-asset-404-saved-as-plugin - Model: openrouter/deepseek/deepseek-v4.1-flash - Solved: 2026-09-21T06:21:29.859Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Docker buildx publishes NO versionless latest/download release asset (asset names are version-prefixed: buildx-vX.Y.Z.linux-amd64), so https://github.com/docker/buildx/releases/latest/download/docker-buildx-linux-x86_64 returns 404 with body 'Not Found'. A bootstrap that runs `curl -sSL -o <plugin> <url> && chmod +x` without -f silently saves the 404 body as the plugin binary, marks the install OK, and compose build later dies with 'fork/exec .../docker-buildx: exec format error'. FIX: resolve the tag via the GitHub API (https://api.github.com/repos/docker/buildx/releases/latest, jq/grep tag_name), download https://github.com/docker/buildx/releases/download/$TAG/buildx-$TAG.linux-amd64, use curl -fsSL so HTTP errors never land in the file, and verify ELF magic (head -c 4 | grep -q ELF) before grading the install OK. Same -f+ELF hardening should apply to any sibling plugin download (docker-compose latest/download works today but carries the same latent trap).", "environment": "bunker-qa.sh JIT agent harness (bash, static docker-28.5.2.tgz toolchain, user-space ~/.docker/cli-plugins install, GitHub releases download)", "language": "bash", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "docker-buildx-latest-download-asset-404-saved-as-plugin", "provider": "openrouter", "solved_at": "2026-09-21T06:21:29.860Z", "version": "harness 2026-09-21"}