Skip to content

Local Gitlab-runner "ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup docker on 192.168.65.1:53: no such host"

I am trying to test my ci-job locally:

# gitlab-ci.yaml
docker:19.03.1
services:
  - name: docker:19.03.1-dind

variables:
  DOCKER_DRIVER: overlay2
  # Create the certificates inside this directory for both the server
  # and client. The certificates used by the client will be created in
  # /certs/client so we only need to share this directory with the
  # volume mount in `config.toml`.

info:
  script:
    - docker info
# config.toml
concurrent = 1
check_interval = 0

[[runners]]
  executor = "docker"
  environment = ["DOCKER_TLS_CERTDIR"]
  [runners.docker]
    tls_verify = false
    image = "docker:19.03.1"
    privileged = true
    cache_dir = "cache"
    disable_cache = false
    volumes = ["/cache"]
  [runners.cache]
    Insecure = false

[session_server]
  session_timeout = 1800

$ gitlab-runner exec docker info

ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup docker on 192.168.65.1:53: no such host

HostSystem: macOS, docker 19.03.1

I've tried every possible option, this setting seems to me the most reasonable for my local setup, still no luck. What do I miss

Edited by Boris Kotov