dockergitlab-cigitlab-ci-runner

No such host CI, docker


Im losing my mind I'm trying to run shared gitlab runners to use them to build my docker image. No matter what I do I always get error that no such host exists.

ERROR: error during connect: Get "http://docker:2375/v1.24/info": dial tcp: lookup docker on XXX.XXX.XXX.XXX:XX: no such host
errors pretty printing info

This is the GITLAB CI pipeline I wrote ( as simple as I could it's obviosuly not it's full configuration).

docker:image:
  stage: test
  image: docker:20.10  
  services:
    - docker:dind:20.10.16 
  script:
  - docker info

Solution

  • It should be docker:20.10.16-dind, not docker:dind:20.10.16

    docker:image:
      stage: test
      image: docker:20.10  
      services:
        - docker:dind:20.10.16 
      script:
      - docker info