Skip to content

Commit feb0ddb

Browse files
hub: add usage tab (#20774)
* hub: add usage tab Signed-off-by: Craig Osterhout <[email protected]> * vale fixes Signed-off-by: Craig Osterhout <[email protected]> * Update content/docker-hub/download-rate-limit.md Co-authored-by: David Karlsson <[email protected]> * Update content/docker-hub/download-rate-limit.md Co-authored-by: David Karlsson <[email protected]> * Update content/docker-hub/download-rate-limit.md Co-authored-by: David Karlsson <[email protected]> * Update content/docker-hub/download-rate-limit.md Co-authored-by: David Karlsson <[email protected]> * Update content/docker-hub/download-rate-limit.md Co-authored-by: David Karlsson <[email protected]> * feedback1 Signed-off-by: Craig Osterhout <[email protected]> * feedback2 Signed-off-by: Craig Osterhout <[email protected]> --------- Signed-off-by: Craig Osterhout <[email protected]> Co-authored-by: David Karlsson <[email protected]>
1 parent bbe4a3c commit feb0ddb

File tree

2 files changed

+130
-63
lines changed

2 files changed

+130
-63
lines changed
Lines changed: 129 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,97 @@
11
---
2-
description: Learn how download rate limits for image pulls on Docker Hub work
3-
keywords: Docker Hub, pulls, download, limit,
4-
title: Docker Hub rate limit
2+
description: Learn about usage and rate limits for Docker Hub.
3+
keywords: Docker Hub, pulls, download, limit, usage
4+
title: Docker Hub usage and rate limits
55
---
66

7-
## What's the download rate limit on Docker Hub?
7+
Understanding your Docker Hub usage and rate limits helps you manage your and
8+
your organization's usage effectively.
89

9-
Docker Hub limits the number of Docker image downloads, or pulls, based on the account type of the user pulling the image. Pull rate limits are based on individual IP address.
10+
## View Docker Hub usage
1011

11-
| User type | Rate limit |
12-
| --------- | ---------- |
13-
| Anonymous users | 100 pulls per 6 hours per IP address |
14-
| [Authenticated users](#how-do-i-authenticate-pull-requests)| 200 pulls per 6 hour period |
15-
| Users with a paid [Docker subscription](https://www.docker.com/pricing) | Up to 5000 pulls per day |
12+
You can download a CSV file of your or your organization's Docker Hub usage. To
13+
download the file:
1614

17-
If you require a higher number of pulls, you can also buy an [Enhanced Service Account add-on](service-accounts.md#enhanced-service-account-add-on-pricing).
15+
1. Sign in to [Docker Hub](https://hub.docker.com).
16+
17+
If you want to download usage for all members of an organization, you must
18+
sign in to an account that is an owner for that organization. Otherwise,
19+
you can only view your own usage.
20+
21+
2. In Docker Hub, navigate to the [**Usage** page](https://hub.docker.com/usage).
22+
3. In the drop-down, select whether to download your personal data or
23+
data for an organization.
24+
4. In **From** and **To**, select a date range for the data.
25+
5. Select **Send report to email** to have Docker email you a link to the data
26+
file. Note that email processing time may vary.
1827

28+
The file contains the following comma separated values.
1929

20-
## Definition of limits
30+
| CSV column | Definition | Usage guidance |
31+
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
32+
| `datehour` | The date and hour (`yyyy/mm/dd/hh`) of the pull that resulted in the data transfer. | This helps in identifying peak usage times and patterns. |
33+
| `user_name` | The Docker ID of the user that pulled the image | This lets organization owners track data consumption per user and manage resources effectively. |
34+
| `repository` | The name of the repository of the image that was pulled. | This lets you identify which repositories are most frequently accessed and consume most of the data transfer. |
35+
| `pat_name` | Name of the personal access token that was used for authentication with Docker CLI. `generated` tokens are automatically generated by the Docker client when a user signs in. | Personal access tokens are usually used to authenticate automated tools (Docker Desktop, CI/CD tools, etc.). This is useful for identifying which automated system issued the pull. |
36+
| `ips` | The IP address that was used to pull the image. This field is aggregated, so more than one IP address may appear, representing all the IPs used to pull an image within the same date and hour. | This helps you understand the origin of the data transfer, which is useful for diagnosing and identifying patterns in automated or manual pulls. |
37+
| `repository_privacy` | The privacy state of the image repository that was pulled. This can either be `public` or `private`. | This distinguishes between public and private repositories to identify which data transfer threshold the pull impacts. |
38+
| `tag` | The tag for the image. The tag is only available if the pull request included a tag. | This helps in identifying the image. Tags are often used to identify specific versions or variants of an image. |
39+
| `digest` | The unique image digest for the image. | This helps in identifying the image. |
40+
| `version_checks` | The number of version checks accumulated for the date and hour of each image repository. Depending on the client, a pull request can do a version check to verify the existence of an image or tag without downloading it. | This helps identify the frequency of version checks, which you can use to analyze usage trends and potential unexpected behaviors. |
41+
| `pulls` | The number of pulls accumulated for the date and hour of each image repository. | This helps identify the frequency of repository pulls, which you can use to analyze usage trends and potential unexpected behaviors. |
2142

22-
A user's limit is equal to the highest entitlement of their
23-
personal account or any organization they belong to. To take
24-
advantage of this, you must sign in to
25-
[Docker Hub](https://hub.docker.com/)
26-
as an authenticated user. For more information, see
27-
[How do I authenticate pull requests](#how-do-i-authenticate-pull-requests).
28-
Unauthenticated (anonymous) users will have the limits enforced via IP.
43+
## Rate limit
44+
45+
A user's rate limit is equal to the highest entitlement of their personal
46+
account or any organization they belong to. To take advantage of this, you must
47+
sign in to [Docker Hub](https://hub.docker.com/) as an authenticated user. For
48+
more information, see [How do I authenticate pull
49+
requests](#how-do-i-authenticate-pull-requests). Unauthenticated (anonymous)
50+
users will have the limits enforced via IP.
2951

3052
- Pulls are accounted to the user doing the pull, not to the owner of the image.
31-
- A pull request is defined as up to two `GET` requests on registry
32-
manifest URLs (`/v2/*/manifests/*`).
33-
- A normal image pull makes a
34-
single manifest request.
35-
- A pull request for a multi-arch image makes two
36-
manifest requests.
53+
- A pull request is defined as up to two `GET` requests on registry manifest
54+
URLs (`/v2/*/manifests/*`).
55+
- A normal image pull makes a single manifest request.
56+
- A pull request for a multi-arch image makes two manifest requests.
3757
- `HEAD` requests aren't counted.
38-
- Some images are unlimited through our [Docker Sponsored Open Source](https://www.docker.com/blog/expanded-support-for-open-source-software-projects/) and [Docker Verified Publisher](https://www.docker.com/partners/programs) programs.
58+
- Some images are unlimited through the [Docker Sponsored Open
59+
Source](https://www.docker.com/blog/expanded-support-for-open-source-software-projects/)
60+
and [Docker Verified Publisher](https://www.docker.com/partners/programs)
61+
programs.
62+
63+
### What's the download rate limit on Docker Hub?
64+
65+
Docker Hub limits the number of Docker image downloads, or pulls, based on the
66+
account type of the user pulling the image. Pull rate limits are based on
67+
individual IP address.
3968

40-
## How do I know my pull requests are being limited?
69+
| User type | Rate limit |
70+
|-------------------------------------------------------------------------|--------------------------------------|
71+
| Anonymous users | 100 pulls per 6 hours per IP address |
72+
| [Authenticated users](#how-do-i-authenticate-pull-requests) | 200 pulls per 6 hour period |
73+
| Users with a paid [Docker subscription](https://www.docker.com/pricing) | Up to 5000 pulls per day |
4174

42-
When you issue a pull request and you are over the limit, Docker Hub returns a `429` response code with the following body when the manifest is requested:
75+
If you require a higher number of pulls, you can also buy an [Enhanced Service Account add-on](service-accounts.md#enhanced-service-account-add-on-pricing).
76+
77+
### How do I know my pull requests are being limited?
78+
79+
When you issue a pull request and you are over the limit, Docker Hub returns a
80+
`429` response code with the following body when the manifest is requested:
4381

4482
```text
4583
You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limits
4684
```
4785

4886
This error message appears in the Docker CLI or in the Docker Engine logs.
4987

50-
## How can I check my current rate?
88+
### How can I check my current rate?
5189

52-
Valid API requests to Hub usually include the following rate limit headers in the response:
90+
Valid API requests to Hub usually include the following rate limit headers in
91+
the response:
5392

5493
```text
55-
ratelimit-limit
94+
ratelimit-limit
5695
ratelimit-remaining
5796
docker-ratelimit-source
5897
```
@@ -61,15 +100,17 @@ These headers are returned on both GET and HEAD requests.
61100

62101
>**Note**
63102
>
64-
>Using GET emulates a real pull and counts towards the limit. Using HEAD won't. To check your limits, you need `curl`, `grep`, and `jq` installed.
103+
> Using GET emulates a real pull and counts towards the limit. Using HEAD won't.
104+
> To check your limits, you need `curl`, `grep`, and `jq` installed.
65105
66106
To get a token anonymously, if you are pulling anonymously:
67107

68108
```console
69109
$ TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
70110
```
71111

72-
To get a token with a user account, if you are authenticated (insert your username and password in the following command):
112+
To get a token with a user account, if you are authenticated (insert your
113+
username and password in the following command):
73114

74115
```console
75116
$ TOKEN=$(curl --user 'username:password' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
@@ -89,43 +130,84 @@ ratelimit-remaining: 76;w=21600
89130
docker-ratelimit-source: 192.0.2.1
90131
```
91132

92-
In the previous example, the pull limit is 100 pulls per 21600 seconds (6 hours), and there are 76 pulls remaining.
133+
In the previous example, the pull limit is 100 pulls per 21600 seconds (6
134+
hours), and there are 76 pulls remaining.
135+
136+
#### I don't see any RateLimit headers
137+
138+
If you don't see any RateLimit header, it could be because the image or your IP
139+
is unlimited in partnership with a publisher, provider, or an open source
140+
organization. It could also mean that the user you are pulling as is part of a
141+
paid Docker plan. Pulling that image won’t count toward pull limits if you don’t
142+
see these headers. However, users with a paid Docker subscription pulling more
143+
than 5000 times daily require a [Service
144+
Account](../docker-hub/service-accounts.md) subscription.
145+
146+
### I'm being limited to a lower rate even though I have a paid Docker subscription
93147

94-
### I don't see any RateLimit headers
148+
To take advantage of the higher limits included in a paid Docker subscription,
149+
you must [authenticate pulls](#how-do-i-authenticate-pull-requests) with your
150+
user account.
95151

96-
If you don't see any RateLimit header, it could be because the image or your IP is unlimited in partnership with a publisher, provider, or an open-source organization. It could also mean that the user you are pulling as is part of a paid Docker plan. Pulling that image won’t count toward pull limits if you don’t see these headers. However, users with a paid Docker subscription pulling more than 5000 times daily require a [Service Account](../docker-hub/service-accounts.md) subscription.
152+
A Pro, Team, or a Business tier doesn't increase limits on your images for other
153+
users. See Docker's [Open
154+
Source](https://www.docker.com/blog/expanded-support-for-open-source-software-projects/),
155+
[Publisher](https://www.docker.com/partners/programs), or [Large
156+
Organization](https://www.docker.com/pricing) offerings.
97157

98-
## I'm being limited to a lower rate even though I have a paid Docker subscription
158+
### Other limits
99159

100-
To take advantage of the higher limits included in a paid Docker subscription, you must [authenticate pulls](#how-do-i-authenticate-pull-requests) with your user account.
160+
Docker Hub also has an overall rate limit to protect the application and
161+
infrastructure. This limit applies to all requests to Hub properties including
162+
web pages, APIs, and image pulls. The limit is applied per-IP, and while the
163+
limit changes over time depending on load and other factors, it's in the order
164+
of thousands of requests per minute. The overall rate limit applies to all users
165+
equally regardless of account level.
101166

102-
A Pro, Team, or a Business tier doesn't increase limits on your images for other users. See Docker's [Open Source](https://www.docker.com/blog/expanded-support-for-open-source-software-projects/), [Publisher](https://www.docker.com/partners/programs), or [Large Organization](https://www.docker.com/pricing) offerings.
167+
You can differentiate between these limits by looking at the error code. The
168+
"overall limit" returns a simple `429 Too Many Requests` response. The pull
169+
limit returns a longer error message that includes a link to this page.
103170

104171
## How do I authenticate pull requests?
105172

106-
The following section contains information on how to sign in to Docker Hub to authenticate pull requests.
173+
The following section contains information on how to sign in to Docker Hub to
174+
authenticate pull requests.
107175

108176
### Docker Desktop
109177

110-
If you are using Docker Desktop, you can sign in to Docker Hub from the Docker Desktop menu.
178+
If you are using Docker Desktop, you can sign in to Docker Hub from the Docker
179+
Desktop menu.
111180

112-
Select **Sign in / Create Docker ID** from the Docker Desktop menu and follow the on-screen instructions to complete the sign-in process.
181+
Select **Sign in / Create Docker ID** from the Docker Desktop menu and follow
182+
the on-screen instructions to complete the sign-in process.
113183

114184
### Docker Engine
115185

116-
If you're using a standalone version of Docker Engine, run the `docker login` command from a terminal to authenticate with Docker Hub. For information on how to use the command, see [docker login](../reference/cli/docker/login.md).
186+
If you're using a standalone version of Docker Engine, run the `docker login`
187+
command from a terminal to authenticate with Docker Hub. For information on how
188+
to use the command, see [docker login](../reference/cli/docker/login.md).
117189

118190
### Docker Swarm
119191

120-
If you're running Docker Swarm, you must use the `-- with-registry-auth` flag to authenticate with Docker Hub. For more information, see [Create a service](../reference/cli/docker/service/create.md/#create-a-service). If you are using a Docker Compose file to deploy an application stack, see [docker stack deploy](../reference/cli/docker/stack/deploy.md).
192+
If you're running Docker Swarm, you must use the `--with-registry-auth` flag to
193+
authenticate with Docker Hub. For more information, see [Create a
194+
service](../reference/cli/docker/service/create.md#with-registry-auth). If you
195+
are using a Docker Compose file to deploy an application stack, see [docker
196+
stack deploy](../reference/cli/docker/stack/deploy.md).
121197

122198
### GitHub Actions
123199

124-
If you're using GitHub Actions to build and push Docker images to Docker Hub, see [login action](https://github.com/docker/login-action#dockerhub). If you are using another Action, you must add your username and access token in a similar way for authentication.
200+
If you're using GitHub Actions to build and push Docker images to Docker Hub,
201+
see [login action](https://github.com/docker/login-action#dockerhub). If you are
202+
using another Action, you must add your username and access token in a similar
203+
way for authentication.
125204

126205
### Kubernetes
127206

128-
If you're running Kubernetes, follow the instructions in [Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) for information on authentication.
207+
If you're running Kubernetes, follow the instructions in [Pull an Image from a
208+
Private
209+
Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
210+
for information on authentication.
129211

130212
### Third-party platforms
131213

@@ -141,19 +223,4 @@ If you're using any third-party platforms, follow your provider’s instructions
141223
- [Drone.io](https://docs.drone.io/pipeline/docker/syntax/images/#pulling-private-images)
142224
- [GitLab](https://docs.gitlab.com/ee/user/packages/container_registry/#authenticate-with-the-container-registry)
143225
- [LayerCI](https://layerci.com/docs/advanced-workflows#logging-in-to-docker)
144-
- [TeamCity](https://www.jetbrains.com/help/teamcity/integrating-teamcity-with-docker.html#Conforming+with+Docker+download+rate+limits)
145-
146-
## Other limits
147-
148-
Docker Hub also has an overall rate limit to protect the application
149-
and infrastructure. This limit applies to all requests to Hub
150-
properties including web pages, APIs, and image pulls. The limit is
151-
applied per-IP, and while the limit changes over time depending on load
152-
and other factors, it's in the order of thousands of requests per
153-
minute. The overall rate limit applies to all users equally
154-
regardless of account level.
155-
156-
You can differentiate between these limits by looking at the error
157-
code. The "overall limit" returns a simple `429 Too Many Requests`
158-
response. The pull limit returns a longer error message that
159-
includes a link to this page.
226+
- [TeamCity](https://www.jetbrains.com/help/teamcity/integrating-teamcity-with-docker.html#Conforming+with+Docker+download+rate+limits)

data/toc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,7 @@ Manuals:
21492149
- path: /docker-hub/repos/categories/
21502150
title: Categories
21512151
- path: /docker-hub/download-rate-limit/
2152-
title: Download rate limit
2152+
title: Usage and rate limits
21532153
- path: /docker-hub/webhooks/
21542154
title: Webhooks
21552155
- path: /docker-hub/service-accounts/

0 commit comments

Comments
 (0)