- Beginning November 1, 2020, [Docker Hub](https://hub.docker.com/) has enabled rate limits based on the originating IP address. Since CircleCI runs jobs from a shared pool of IPs, it is strongly recommended to use authenticated Docker pulls with Docker Hub to avoid encountering rate limits. Identifying this error can be done by examining the `Spin Up Environment` step of your build output for a `toomanyrequests:Too Many Requests` error message. **Solutions:** Using authentication for Docker Hub in your builds is the best way to avoid being rate limited for Docker image Pulls. The first suggestion is to create a [Context](https://circleci.com/docs/2.0/contexts/) for your Docker Hub credentials to encorporate in your `config.yml`. Example config: ![context-example](https://support.circleci.com/hc/article_attachments/360071877191/docker-hub-context.png) You may also use a per-project Environment Variables as shown here. ![project-level-env-var](https://support.circleci.com/hc/article_attachments/360071877271/project-env-var.png) Alternative soltuions can also be found here in our [Documentation here.](https://circleci.com/docs/2.0/private-images) Further below is an example of a build failure due to encountering the Docker rate limit. ![screenshot](https://support.circleci.com/hc/article_attachments/360070433772/Screen_Shot_2020-09-27_at_8.55.35_AM.png)
My build fails to pull Docker image with "Too Many Requests" - Rate Limiting by Docker Hub
Was this article helpful?
2 out of 2 found this helpful