Created
March 31, 2025 11:11
-
-
Save drubb/7ee05ea89f11757586a6f304317f33d5 to your computer and use it in GitHub Desktop.
Shellscript to check Docker Hub rate limits for anonymous and authenticated users. Use your own Docker credentials!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo 'Docker Hub rate limits for anonymous users:' | |
| TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) | |
| curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest | |
| echo 'Docker Hub rate limits for authenticated users:' | |
| TOKEN=$(curl --user 'user:password' "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token) | |
| curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment