The gitlab Pipeline fails (because of docker rate limit) - docker

I have a gitlab-ci.yml in my project.
It was passed, after every merge.
But today it faces this error:
Preparing the "docker" executor
00:31
Using Docker executor with image maven:3.6.3-jdk-11 ...
Pulling docker image maven:3.6.3-jdk-11 ...
ERROR: Preparation failed: 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 (docker.go:131:3s)
Will be retried in 3s ...
What can I do for solving this?

Related

GitLab Runner & Docker: ERROR: Preparation failed: Error: No such image

When attempting to pull public images (e.g. python:3.6, node:latest) from Docker, our GitLab runner failed with the following error message:
Running with gitlab-runner 12.2.0 (a987417a)
on GitLab Runner XYZ
Using Docker executor with image python:3.6 ... 00:17
Starting service python:3.6 ...
Pulling docker image python:3.6 ...
ERROR: Preparation failed: Error: No such image: python:3.6 (executor_docker.go:199:0s)
The cause was we exceeded Dockers pull rate limit:
Free plan – anonymous users: 100 pulls per 6 hours
Free plan – authenticated users: 200 pulls per 6
How can I check my current rate?
See https://docs.docker.com/docker-hub/download-rate-limit/#how-can-i-check-my-current-rate
How to increase the rate limit?
Authenticate with Docker Hub to increase to 200 pulls per 6 hours:
docker login
Alternatively you can cache Docker images to reduce the number of calls to DockerHub from your CI/CD infrastructure.

Fixing Docker "build from" failure on repo (insufficient_scope: authorization failed) where "docker pull" (of JBPM) succeeds

Trying my first-ever "docker build" I am seeing:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
I can get the image with docker pull:
PS C:\Users\dr_cl\Desktop\ams-pam> docker pull jboss/jbpm-server-full:7.48.0.Final
7.48.0.Final: Pulling from jboss/jbpm-server-full
a02a4930cb5d: Pull complete
b5ffff9dbcda: Pull complete
...
Digest: sha256:65884b407c1922ee74b829ed7e138ce8a7ebbbabe4d3ff157e09d9939c69295c...
I am logged in to Docker Hub so how do I correct this - the only non-commented out line in my - Dockerfile - from failing (and why)?
FROM jbpm-server-full#sha256:65884b407c1922ee74b829ed7e138ce8a7ebbbabe4d3ff157e09d9939c69295c as jbpm

Failed to pull dockerhub image on Kubernetes

I'm using minikube for kubernetes deployment and I am getting this error:
Failed to pull image
"libsynadmin/libsynmp:core-api-kubernetes-0.9.8.1": rpc error: code =
Unknown desc = Error response from daemon: Get
https://registry-1.docker.io/v2/: net/http: TLS handshake timeout ?
I think you need to create docker registry cache to pull images from since the error indicate slow internet connection
read more at Docker
Are you running behind company proxy then you have to use minikube start command as follows:
minikube start --docker-env HTTP_PROXY=http://$YOURPROXY:PORT \
--docker-env HTTPS_PROXY=https://$YOURPROXY:PORT
Ref: minikube issue

GCR Builds fail

In the last week all of my builds with Google Cloud Registry fail with the following message after 1 minute of build time:
Error response from daemon: No such container: b673590505f0d07c58c5d6413d46d522b4f17549ebe72c523230eff0f8772e6f
Error: No such container: b673590505f0d07c58c5d6413d46d522b4f17549ebe72c523230eff0f8772e6f
seem like the build containers are dying?

Kubernetes executor on Gitlab ERROR: Job failed: image pull failed

I tried to setup Kubernetes executor on Gitlab, but I have this error:
ERROR: Job failed: image pull failed: image pull failed for
someprivateimage:latest,
this may be because there are no credentials on this request. details:
(Error response from daemon: {"message":"Get
https://someprivateimage/latest: denied: access forbidden"})
Anyone have idea why?
You need to either:
Have the docker daemon on your node login to the docker registry. Have a look at the docker login docs
Have the pod definition pull from a private registry. Take a look at these kubernetes docs
If you're going to be doing this often, I recommend the first one.

Resources