skip to Main Content

I set up the runner on Mac through the tutorial and assign the job to it to run.

Below is my configuration in .gitlab-ci.yml based on this answer.

OPTION 1

image: docker:latest
services:
  - docker:18.09.7-dind

OPTION 2

image:
  name: docker:latest
services:
  - docker:dind
variables:
  DOCKER_DRIVER: overlay2
  DOCKER_TLS_CERTDIR: "/certs"

Both end up with the same error in the pipeline.

Failed Pipeline

Is there any configuration I am missing?

I have restarted the runner after changing config.toml.

OPTION 1

privileged = true

OPTION 2

privileged = true
volumes = ["/certs/client", "/cache"]

2

Answers


  1. Chosen as BEST ANSWER

    Finally I solved it this way.


  2. You have configured DOCKER_TLS_CERTDIR but your client is trying to use the insecure port (2375). When this is configured, you should set the DOCKER_HOST environment variable to tcp://docker:2376. Alternatively, set an empty value for the certdir to disable TLS and use port 2375 instead DOCKER_TLS_CERTDIR: ""

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search