Inconsistent behaviour of docker pull rate limit

Sorry if this is the wrong place, but I don’t see a section on rate limits

As i understand it, the rate limit on anonymous pulls does not apply to open source project images.
I have verified this using the docker hub api and querying rate limit before and after pulling an alpine linux image, i.e. no change.

However when I conduct the same experiment from within a container, running on the same host and ‘billing’ to the same IP, the rate limit is decremented. If I continue to pull more OS images, I can drive the limit to zero and I get “toomanyrequests: You have reached your pull rate limit…”

Returning to the host, the rate limit also shows as zero, but I can pull the same open source image successfully as expected.

Why does the ‘Open Source’ nature of the pulled image not recognized from within the container?

Docker version 23.0.5, build bc4487a on both host and within container

OS: Debian bullseye

It shouldn’t matter, but to be hoenst I don’t remember when I checked rate limits last time. Is the container “Docker in Docker” with the deamon also running in the container or just a client using the socket from the host?

If the Docker version is the same, I wonder what happens when you use the host network in the container. Can you test it so we can see if it is only about the network isolation or something else?

Yes, the client is using the docker socket from the host.


Have you tried it?

Yes, I can reproduce it with host networking. The behaviour is the same.

Then unless you were already logged in on the host, I don’t know why the client in the container would behave differently :frowning: . If nobody else has a better idea, you could also search for similar issues on GitHub and create one if there is no similar.