Last active
January 25, 2023 14:00
-
-
Save flavono123/a1cc0e62cf5786f5b3d2d9d6cf151af0 to your computer and use it in GitHub Desktop.
Check remaining Docker pull requests for anonymous
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/bash | |
| # ref. https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/ | |
| 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 2>&1 | grep ratelimit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment