Page 1 of 1

Check docker rate limitation

Posted: Sun Jun 21, 2026 8:16 pm
by wroomwroom

Code: Select all

TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r '.token') && RATE_LIMIT_REMAINING=$(curl --head -s -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest | sed -n 's/.*[Rr]atelimit-remaining: \([0-9]*\).*/\1/p') && echo "remaining pulls = ${RATE_LIMIT_REMAINING}"