CivicActions / docker-gitlab-runner

Gitlab Runner image with docker and docker-compose
MIT License
3 stars 1 forks source link

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? #2

Open wangliguokaka opened 6 years ago

wangliguokaka commented 6 years ago

after I runned your image "docker-gitlab-runner" and exec docker ps command in the container, the exception occur "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?". other people's suggest is not enough help. can you help me to slove this issue? thank you. 123

grugnog commented 6 years ago

You will need to mount the docker socket as described in https://docs.gitlab.com/runner/install/docker.html

i.e.: docker run -d --name gitlab-runner --restart always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ civicactions/docker-gitlab-runner:latest