I have /etc/gitlab-runner/config.toml
[[runners]]
name = "My Docker Runner"
url = "###"
token = "###"
executor = "docker"
pre_clone_script = "git config --global http.sslVerify false"
[runners.custom_build_dir]
[runners.docker]
tls_verify = false
image = "tiangolo/docker-with-compose"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
shm_size = 0
[runners.cache]
Insecure = false
[runners.cache.s3]
[runners.cache.gcs]
.gitlab-ci.yml
stages:
- test
before_script:
- apk update
- apk upgrade
- apk add make
test:
stage: test
tags: [test]
script:
- make prod-up # docker-compose up -d --build
- make composer-init-dev
- make test
When I run the script in gitlab, I get the error:
$make prod-up docker-compose -f docker-compose.prod.yml up -d --build Couldn't connect to Docker daemon at http://docker:2375 - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable. make: *** [Makefile:16: docker-prod-up] Error 1 ERROR: Job failed: exit code 2
Please help, what am I doing wrong?