Skip to content

fix(build-rootfs): skip docker pull when the image is already local#250

Merged
WaylandYang merged 2 commits into
mainfrom
fix/build-rootfs-local-image-pull
Jun 14, 2026
Merged

fix(build-rootfs): skip docker pull when the image is already local#250
WaylandYang merged 2 commits into
mainfrom
fix/build-rootfs-local-image-pull

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

`build-rootfs.sh` unconditionally `docker pull`ed `$IMAGE` before exporting. For recipe-built local images that only exist on this host (the `coding-agent` recipe builds + tags `forkd-coding-agent:tmp-$$`), that pull is a needless registry round-trip — and behind a throttled registry mirror it returns 429 Too Many Requests and aborts the entire rootfs build.

Fix: `docker image inspect "$IMAGE" >/dev/null 2>&1 || docker pull -q "$IMAGE"` — use a local image as-is, only fetch genuinely-remote ones.

Found while re-baking the coding-agent hub asset (#242 follow-up); the bake failed three times on this exact 429 until patched. Also makes local / air-gapped `build-rootfs` runs mirror-independent.

Test plan

  • coding-agent recipe (local wrapped image) bakes cleanly with this fix — produced a working portable pack uploaded to hub-coding-agent-v1
  • `bash -n` clean
  • CI green

🤖 Generated with Claude Code

WaylandYang and others added 2 commits June 14, 2026 22:52
build-rootfs.sh unconditionally `docker pull`ed $IMAGE before creating
the export container. For recipe-built wrapped images that exist only on
this host (the coding-agent recipe tags one `forkd-coding-agent:tmp-$$`),
that pull is a needless registry round-trip — and behind a throttled
registry mirror it returns 429 and aborts the whole rootfs build.

Guard the pull with `docker image inspect ... ||` so a local image is
used as-is and only genuinely-remote images are fetched. Surfaced while
re-baking the coding-agent hub asset (#242 follow-up); also makes every
local/air-gapped build-rootfs run mirror-independent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WaylandYang WaylandYang merged commit 3a092ad into main Jun 14, 2026
2 checks passed
@WaylandYang WaylandYang deleted the fix/build-rootfs-local-image-pull branch June 14, 2026 14:56
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