来自守护进程的错误响应:toomanyrequests:您已达到拉取速率限制。您可以通过身份验证和升级来提高限制:https://www.docker.com/increase-rate-limits
Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits
ID: policy/docker-hub-pull-rate-limit-exceeded-anonymous
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Docker Engine v20.10+ | active | — | — | — |
| Docker Hub rate limits (Nov 2020) | active | — | — | — |
根因分析
Docker Hub 对匿名用户(每 6 小时 100 次拉取)和经过身份验证的免费用户(每 6 小时 200 次拉取)实施速率限制;CI/CD 管道或开发机器超出了此限制。
English
Docker Hub enforces rate limits on anonymous users (100 pulls per 6 hours) and authenticated free users (200 pulls per 6 hours); the CI/CD pipeline or developer machine exceeded this limit.
官方文档
https://docs.docker.com/docker-hub/download-rate-limit/解决方案
-
使用 docker login 登录 Docker Hub,将免费账户的限制提高到每 6 小时 200 次拉取。
-
使用 Docker Hub 付费订阅(Pro/Team)获得无限拉取,或将镜像镜像到私有仓库(如 Amazon ECR 或 GitHub Container Registry)。
无效尝试
常见但无效的做法:
-
40% 失败
Works but is impractical for CI/CD pipelines that need immediate builds; also, the limit resets based on a rolling window, not a fixed time.
-
80% 失败
The rate limit applies per image pull, not per tag; changing tags does not bypass the limit.