Issue
We are using the Jenkins docker plugin to pull the CI image from docker.com. This has worked for years:
def oppossumCI = docker.image('hyrise/opossum-ci:20.04');
oppossumCI.pull()
Since a couple of days, we are seeing this error message:
+ docker pull hyrise/opossum-ci:20.04
Error response from daemon: toomanyrequests: You have reached your pull rate limit.
You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Solution
If you are not logged in to docker.com, "you" as used in the error message seems to be identified by the IP address. In a setup where multiple systems pull from docker.com with the same IP address (e.g., a university), you will quickly run out of resources. As a result, things may suddenly look broken just because someone else on the network depleted the resources.
By using a free Docker account, your CI server will be assigned its own resources.
Steps:
- Create an account on hub.docker.com.
- Add the credentials to Jenkins' credential store. In this example, the credentials have the ID
docker
. - Modify your Jenkinsfile to use the account:
docker.withRegistry('https://registry.hub.docker.com', 'docker') {
def oppossumCI = docker.image('hyrise/opossum-ci:20.04');
oppossumCI.pull()
...
}
If the resources provided for the free user are not sufficient, you might need to upgrade to a paid account.
Answered By - mrks