This is my .gitlab-ci.yml
file:
image: docker:18
varibales:
DOCKER_DRIVER: "overlay2"
DOCKER_HOST: tcp://docker:2375
test:
services:
- "docker:18-dind"
script:
- docker info
I run it with:
gitlab-runner exec docker --docker-privileged --docker-pull-policy if-not-present --docker-tlsverify=false test
and it works.
But I want to use current docker version. So I read this documentation.
image: docker:19
varibales:
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: "overlay2"
DOCKER_HOST: tcp://docker:2375
test:
services:
- "docker:19-dind"
script:
- docker info
I run it with the same as above:
gitlab-runner exec docker --docker-privileged --docker-pull-policy if-not-present --docker-tlsverify=false test
unfortunately this ends with error:
ERROR: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?
I have saw this issue and many others. But I couldn't find a minimal working example that works with gitlab-runner exec docker
on every unix system with docker:19
and docker:19-dind
EDIT:
gitlab-runner --version(from Manajaro repo):
Version: 13.0.0
Git revision: HEAD
Git branch: HEAD
GO version: go1.14.4
Built: unknown
OS/Arch: linux/amd64