Gitlab-runner : ERROR: Preparation failed: failed to pull image "registry.gitlab.com/

ERROR: Preparation failed: failed to pull image “registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-c1edb478” with specified policies [always]…

Got this error while running a job using gitlab runner

Command ran

sudo gitlab-runner exec docker lint

Complete Error

ERROR: Preparation failed: failed to pull image "registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:x86_64-c1edb478" with specified policies [always]: Error response from daemon: Head "https://registry.gitlab.com/v2/gitlab-org/gitlab-runner/gitlab-runner-helper/manifests/x86_64-c1edb478": dial tcp: lookup registry.gitlab.com on 8.8.8.8:53: read udp 192.168.1.207:46061->8.8.8.8:53: i/o timeout (manager.go:205:41s)

Related versions

  • GitLab : 14.1.1
  • Runner : 14.0.1

Part of gitlab-ci.yml looks like this

stages:
  - lint

lint : 
  stage : lint 
  image: python:3.6
  script:
    - pip install pre-commit
    - pip install docker-compose
    - pre-commit run --all-files

Solution : Reinstalled gitlab runner docker image and it works for me now