Docker Hub Pull Rate Limits#
Docker Hub enforces pull rate limits on a 6-hour rolling window based on authentication status :
| User type | Limit per 6 hours |
|---|---|
| Unauthenticated | 100 per IPv4 address / IPv6 /64 subnet |
| Personal (authenticated) | 200 |
| Pro / Team / Business | Unlimited |
When the limit is exceeded, Docker returns HTTP 429 with body You have reached your pull rate limit… . A separate abuse rate limit (also 429 Too Many Requests, but without that body) applies to all users regardless of plan .
Note on official documentation: The two canonical Docker docs pages (pull usage and usage & limits) have at times shown contradictory anonymous-pull quotas. Teach the workaround, not the specific number—verify any cited figure on the day it is written .
You can inspect your current remaining quota without consuming a pull using a HEAD request against registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest with a bearer token, and examining the ratelimit-limit / ratelimit-remaining response headers .
Why This Matters in a Classroom#
In a university setting, all students share a single campus public IP. Anonymous pulls exhaust the 100-pull quota almost immediately once a cohort starts a practical session. The resulting toomanyrequests error is opaque to beginners .
The course currently has no teaching on pull rate limits and docker login does not appear in any chapter. The proxy chapter describes the phenomenon as a "blacklist" — this is incorrect terminology; Docker Hub applies rate limiting, not IP banning.
Workarounds (Ranked by Practicality)#
1. docker login before the session (fastest)
Authenticating raises the per-user quota from 100 to 200 and, more importantly, counts pulls against the user's identity rather than the shared campus IP:
docker login # prompts for Docker Hub username + password/token
For Docker Engine (non-Desktop), use docker login from a terminal. For CI environments, see platform-specific instructions .
2. Pre-pull images at the start of the session
Pull all images needed for the lab before students begin, so subsequent docker run calls are satisfied from the local cache without hitting Hub.
3. Configure a registry mirror (campus-level fix)
The university provides a caching proxy at cache-ili.univ-artois.fr. Add it to /etc/docker/daemon.json:
{
"registry-mirrors": ["http://cache-ili.univ-artois.fr:80/proxy_cache/"],
"insecure-registries": ["cache-ili.univ-artois.fr:80"]
}
Then restart Docker: sudo systemctl restart docker. After this, standard commands like docker pull ubuntu:22.04 route transparently through the cache .
⚠️ Unverified configuration: The
registry-mirrorsentry above includes a URL path (/proxy_cache/), which deviates from Docker's documented form (schema + host only). Docker'sValidateMirrorfunction accepts the path without error, so Docker will start — but implicit pulls may silently fall back to Docker Hub if the cache server does not expose the v2 Registry API under that path. Test on campus before the first session. If it fails, try"http://cache-ili.univ-artois.fr:80"(no path) inregistry-mirrors, and use the explicit path only in directdocker pullcommands .
Explicit pulls using the full cache path always work regardless of the registry-mirrors config:
docker pull cache-ili.univ-artois.fr:80/proxy_cache/library/ubuntu:22.04
Documentation Gaps and Known Issues#
Three open issues track documentation problems in proxy.adoc:
| Issue | Location | Status |
|---|---|---|
Rate limits never taught; docker login missing; "blacklist" terminology wrong | Course-wide / proxy.adoc L6 | Open — needs dedicated slide + TP prep note |
registry-mirrors configured with a URL path (/proxy_cache/) — non-standard and functionally unverified | proxy.adoc L80–81 | Open — requires on-campus test |
ENV-based proxy config labeled "Recommended" embeds credentials in the image (readable via docker history); --build-arg example is missing its FROM line | proxy.adoc L258 | Open — remove "Recommended" label, present daemon/~/.docker/config.json form instead, add BuildKit build secrets |
The security-production chapter also references Docker Hub pull limits briefly in the context of private registries as a motivation for hosting images privately .
Key Source Files#
| File | Purpose |
|---|---|
proxy.adoc | University proxy / registry mirror setup lecture |
| Docker Hub pull usage docs | Authoritative rate limit table and quota-check commands |
| Issue #442 | Rate limit teaching gap + terminology fix |
| Issue #443 | registry-mirrors path configuration verification |
| Issue #447 | ENV credential security + --build-arg snippet fix |