Skip to content

Instantly share code, notes, and snippets.

@flavono123
Last active January 25, 2023 14:00
Show Gist options
  • Select an option

  • Save flavono123/a1cc0e62cf5786f5b3d2d9d6cf151af0 to your computer and use it in GitHub Desktop.

Select an option

Save flavono123/a1cc0e62cf5786f5b3d2d9d6cf151af0 to your computer and use it in GitHub Desktop.
Check remaining Docker pull requests for anonymous
#!/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