Docker images are pulled by anonymous user rather then authenticated
See original GitHub issueI have logged in with docker login -u <username>
and base64 encrypted record was written to ~/.docker/config.json
as:
"https://index.docker.io/v1/": {
"auth": "<base64encoded username:password>"
}
However, when I use Testcontainers it pulls images as an anonymous user rather than authenticated.
Examined by pull ratelimit-remaining
check:
[anonymous] TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
[authenticated] TOKEN=$(curl --user 'username:password' "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
I see that anonymous user pull ratelimit-remaining
decreases, however for an authenticated user, it stays the same.
The problem leads to reaching Docker pull rate limit much faster
Error during callback: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"toomanyrequests: You have reached your pull rate limit
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Resource Consumption Updates FAQ - Docker
Unauthenticated pull requests are “anonymous” and will be rate limited based on IP address rather than user ID. For more information on authenticating...
Read more >How can I pull anonymously but require authentication ... - JFrog
User -added image. Thereafter, you will be able to pull images anonymously, as is demonstrated in the following example: & docker pull ......
Read more >Authenticating with Docker Hub for AWS Container Services
In this post, you will learn how to authenticate with Docker Hub to pull images from private repositories using both Amazon ECS and...
Read more >Nexus Docker Registry - Failling anonymous pull
While it works with authenticated users, trying to use anonymous user to pull images doesn't work. This happens only on a docker client....
Read more >Caching Docker images to reduce the number of calls ... - GitLab
For pull requests by anonymous users, this limit is now 100 pull requests ... will then use your mirror instead of connecting to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think you’ve run into this existing issue: https://github.com/testcontainers/testcontainers-java/issues/4474
The key log lines are:
If you were to remove the
docker.io/
prefix from your image name, I think it should work…@kshpak I notice that you’ve edited your comment above, presumably due to credentials appearing.
I’ve deleted the original revision of the comment so that it cannot be retrieved.