fix(kind): route docker.io through mirror.gcr.io to dodge Docker Hub 429s - #409
Open
yoavkatz wants to merge 1 commit into
Open
fix(kind): route docker.io through mirror.gcr.io to dodge Docker Hub 429s#409yoavkatz wants to merge 1 commit into
yoavkatz wants to merge 1 commit into
Conversation
…429s Docker Hub's anonymous pull limit (100/6h per IP) causes 429 on the node's base-image pulls (busybox:1.36 init containers -> Init:ErrImagePull) with no account to log into. Route docker.io through Google's public pull-through cache mirror.gcr.io: add containerdConfigPatches to set config_path, then write a docker.io hosts.toml drop-in into the node after create. Transparent -- image refs are unchanged, so release build-input hashing is unaffected. Document the mirror approach (node containerd + podman machine registries.conf) in the podman-on-apple-silicon guide, alongside the existing ECR one-off. Signed-off-by: Yoav Katz <katz@il.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Docker Hub's anonymous pull rate limit (100 pulls / 6 h, per IP) trips a
429 Too Many Requestson the kind node's base-image pulls — most visibly thebusybox:1.36init containers, which land inInit:ErrImagePulland stall arun. With no Docker Hub account on the machine,
docker login(which only raisesthe ceiling to 200/6 h anyway) isn't a fix.
Change
Route
docker.iothroughmirror.gcr.io, Google's public pull-through cacheof Docker Hub — no account, no rate limit. This is transparent: image
references stay literally
busybox:1.36/python:3.12-slim; only the source ofthe bytes moves. Because the digests served are identical, an image's build-input
hash is unchanged, so this does not perturb release build-input hashing.
deploy/kind/create.sh—create_cluster()now emits acontainerdConfigPatchesblock settingconfig_path = "/etc/containerd/certs.d", then writes adocker.iohosts.tomldrop-in into the node afterkind create cluster, pointing atmirror.gcr.iowithcapabilities = ["pull", "resolve"]. A fresh cluster (or--recreate) picks it up.docs/guides/podman-on-apple-silicon.md— the existing "Docker Hub ratelimits (429)" section now documents the durable mirror approach for both
toolchains (node containerd via
create.sh, and the podman machine'sregistries.conffor host-side builds), keeping the ECR public-mirror retag asthe quick one-off.
No Dockerfile / manifest / preset
FROM/image:lines are touched — thetransparent mirror covers every
docker.ioreference at once, and the pinneddocker.io/...vendor and per-task images resolve through it unchanged.Scope & rules
Code + docs only; no rule (
.agents/) changes — satisfies contributingprinciple 2 (rules-or-code, not both). Checked against:
.agents/delivery/RULES.md— principles 11/12/14 (build inputs & recordedhashes): a transparent mirror changes byte source, not image refs or digests,
so build-input hashing and "fail dirty" are unaffected.
.agents/docs/RULES.md— the guide edit is explanatory, common-path-first,runnable commands, no RFC 2119 keywords, no doctrine restatement.
Verification
podman pull python:3.12-slimandbusybox:1.36resolve via the mirror withno 429 (host path).
docker buildx bakeof aFROM python:3.12-slimtarget pulls through themirror and loads locally, once the BuildKit builder carries the same mirror
config (documented separately; machine-local, not in this PR).
bash -nand the repo'sshellcheckpre-commit hook (--severity=warning)pass on
create.sh.The currently-running dev cluster is intentionally left untouched (no live
containerd restart); the mirror takes effect on the next
--recreate.🤖 Generated with Claude Code