Published on: March 24, 2025
5 min read
Learn how Docker Hub's upcoming pull rate limits will affect GitLab pipelines and what you can do to avoid disruptions.
On April 1, 2025, Docker will implement new pull rate limits to Docker Hub that may significantly impact CI/CD pipelines across the industry, including those running on GitLab. The most significant change is the 100 pulls-per-6-hours limit for unauthenticated users.
Starting April 1, Docker will enforce the following pull rate limits:
User type | Pull rate limit per hour | Number of public repositories | Number of private repositories |
---|---|---|---|
Business, Team, Pro (authenticated) | Unlimited (fair use) | Unlimited | Unlimited |
Personal (authenticated) | 200 per 6-hour window | Unlimited | Up to 1 |
Unauthenticated users | 100 per 6-hour window per IPv4 address or IPv6 /64 subnet | Not applicable | Not applicable |
Impact on direct Docker Hub pulls
If your CI/CD pipelines directly pull images from Docker Hub without authentication, they will be limited to 100 pulls per six-hour window per IP address. For pipelines that run frequently or across multiple projects sharing the same runner infrastructure, this will quickly exhaust the limit and cause pipeline failures.
Impact on GitLab Dependency Proxy
The GitLab Dependency Proxy feature allows you to cache Docker images within GitLab to speed up pipelines and reduce external dependencies. However, the current implementation pulls from Docker Hub as an unauthenticated user, meaning it will also be subject to the 100 pulls-per-6-hours limit.
Impact on hosted runners
For hosted runners on GitLab.com, we use Google Cloud's pull-through cache. This mirrors the commonly pulled images and allows us to avoid rate limits. Job images defined as image:
or services:
in your .gitlab-ci.yml
file, are not affected by rate limits.
Things are slightly more challenging whenever images are pulled within the runner environment. The most common use case to pull images during runner runtime is to build an image using Docker-in-Docker or Kaniko. In this scenario, the Docker Hub image defined in your Dockerfile
is pulled directly from Docker Hub and is likely to be affected by rate limits.
We're actively working on solutions to mitigate these challenges:
Option 1: Configure Docker Hub authentication in your pipelines
For pipelines that pull directly from Docker Hub, you can configure authentication to increase your rate limit to 200 pulls per six-hour window (or unlimited with a paid Docker Hub subscription).
Add Docker Hub credentials to your project or group CI/CD variables (not in your .gitlab-ci.yml
file). Please refer to our documentation on using Docker images for detailed instructions on setting up the DOCKER_AUTH_CONFIG
CI/CD variable correctly.
Option 2: Use the GitLab Container Registry
Consider pushing your frequently used Docker images to your GitLab Container Registry. This eliminates the need to pull from Docker Hub during CI/CD runs:
docker pull busybox:latest
docker tag busybox:latest $CI_REGISTRY_IMAGE/busybox:latest
docker push $CI_REGISTRY_IMAGE/busybox:latest
Then in your .gitlab-ci.yml
:
image: $CI_REGISTRY_IMAGE/busybox:latest
Option 3: Use GitLab Dependency Proxy
GitLab's Dependency Proxy feature provides a way to cache and proxy Docker images, reducing external dependencies and rate limit issues.
Current authentication options:
Once authentication is properly configured, you can:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/busybox:latest
Option 4: Consider a Docker Hub paid subscription
For organizations with heavy Docker Hub usage, upgrading to a paid Docker subscription (Team or Business) will provide unlimited pulls, which may be the most straightforward solution.
Regardless of which option you choose, consider these best practices to minimize Docker Hub rate limit impact:
latest
to avoid unnecessary pulls.Note: According to Docker Hub documentation, the pull count is incremented when pulling the image manifest, not based on image size or number of layers.
Now
April 1, 2025
April 17, 2025
We recommend taking action well before the April 1 deadline to avoid unexpected pipeline failures. For most users, configuring the Dependency Proxy with Docker Hub authentication is the most efficient long-term solution.
Have questions or need implementation help? Please visit this issue where our team is actively providing support.