How to bypass Docker pull rate limit
Written by Vivek Shukla
Docker has put in a rate limit on pull requests for unauthenticated user and users with free account which are 100 and 200 respectively every 6 hours.
One of most effective ways to avoid being rate limited by docker is to reduce the call to docker APIs when pulling images. Every time when you pull a image with tag, even though the image is available locally (after first pull) docker still calls the tags list API for that image, so that it can make sure that this is current version.
This is due to the fact that tags in Docker images are mutable and can by at any point in time changed to different image state. To simply avoid this and bypass the api call to tags api use the Digest of the docker image, which is a hash of the docker image at a given point. When digest is used in image name, docker will first check if we have this image locally and if it does then it will simple re-use the local image without reaching out to docker APIs.
This is how to use digest with docker image name:
postgres:15.15-trixie@sha256:24d6c206bba8c0440bceb24a8d4bf642f60bf7aea94887051ea5761d29c22323