Search code examples
dockergitlabgitlab-cigitlab-ci-runnerdocker-registry

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)

Solution

  • 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.