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.
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
Finally I solved it this way.
You have configured
DOCKER_TLS_CERTDIR
but your client is trying to use the insecure port (2375). When this is configured, you should set theDOCKER_HOST
environment variable totcp://docker:2376
. Alternatively, set an empty value for the certdir to disable TLS and use port 2375 insteadDOCKER_TLS_CERTDIR: ""