I have docker-compose file which is working fine locally on my computer. I register gitlab-runner on the same pc and every pipeline where I use any docker command fails with an error: "docker: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?". I believe I've tried all proposed solutions - nothing works. I use private company network with VPN, maybe it is the issue. My gitlab-ci.yml
build:docker:
image: docker:19.03.12-dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DOCKER_PRIVILEGED: "true"
services:
- name: docker:19.03.12-dind
alias: docker
command: ["--tls=false"]
before_script:
- apk update
- apk upgrade
- apk add py3-pip docker
- apk add --no-cache bash python3
- docker build -t $CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:${CI_COMMIT_REF_SLUG}_server.$CI_PIPELINE_ID ./server/
- docker run -d -p 80:80 docker/getting-started
# - docker-compose -f docker-compose.yml up
my gitlab-runner created as a docker container using docker exe
If someone faced the same problem please help me understand what am I missing here.