Monk CIMonk CI home

26 Nov, 2026Nitin Mandale

Slow Docker Pulls in CI: Registry Mirrors, Rate Limits and Network Bottlenecks


Your CI job spends minutes pulling an image before the build even starts. A faster runner may not help if the delay is a registry limit, a long network path, or repeated downloads on fresh machines. Here is how to narrow it down.

First, identify what is slow

Check whether the delay is in an explicit docker pull, a job or service image, or the Dockerfile's FROM step. These may use different clients or builders. Compare the same image digest and runner region across cold and warm runs; record total pull time, retries, and the time spent downloading versus extracting layers.

For example, if downloads finish quickly but extraction stalls, investigate runner disk throughput and CPU before moving the registry. If downloads slow down only when many jobs start together, examine shared bandwidth and registry requests during that peak.

An image pull fetches image layers. A Docker build cache reuses results of build steps. Both matter, but a warm build cache does not guarantee every image pull will be fast.

Check for registry throttling

Look for HTTP 429 responses in the job or daemon logs. Docker Hub distinguishes a pull rate limit message from a generic Too Many Requests abuse-limit response. Authenticate CI pulls with a Docker Hub account and token stored in CI secrets; if the pull limit is still too low, consider the appropriate plan. For abuse limits, reduce excessive requests and use retries with backoff. Docker's troubleshooting guide covers both cases.

Unauthenticated Docker Hub pulls share a limit by public IPv4 address or IPv6 /64 subnet, so runners behind the same outbound address can consume the same allowance. Docker's current limits and rate-limit headers help you check the actual allowance.

Reduce repeated transfers with a mirror

A pull-through mirror close to your runners can cache frequently used images: the first request fetches from upstream; later requests can reuse stored content. For Docker Hub, Docker's mirror guide covers registry setup and daemon configuration. A separately configured BuildKit builder may need its own registry mirror configuration.

Keep the mirror reachable and authenticated where needed, especially if it can serve private images. A mirror still depends on the upstream registry for cache misses and tag checks; it is not a guarantee against rate limits.

Compare the first pull through the mirror with later pulls from a fresh runner. Check mirror logs to confirm requests are reaching it and distinguish cache hits from upstream fetches.

Measure the network path

If pulls succeed but remain slow, compare runners and mirrors in the same region, and inspect layer transfer rates, proxy or NAT saturation, and extraction time. Test different levels of concurrent jobs before changing download concurrency. Compare the same digest and cache state each time.

For the build itself, Monk CI's Docker build guide explains how to reuse BuildKit state across jobs. Measure image pulls separately so registry delays stay visible.

Try Monk CI for free

Continue with GitHub