I have an issue with a GitLab Runner that has a service attached. Whenever the job is run, as soon as waiting for the service is completed, it gives me a warning:
ContainerStart: Error response from daemon: Cannot link to a non running container: /runner-b565e58e-project-4-concurrent-0-mysql-0 AS /runner-b565e58e-project-4-concurrent-0-mysql-0-wait-for-service/service
gitlab-ci.yml
stages:
- test
test:
stage: test
image: primus852/gitlab:latest
services:
- name: mysql:latest
command: ["cp tests/Files/db.sql /docker-entrypoint-initdb.d/"]
...
config.toml
[runners.docker]
tls_verify = false
image = "php:fpm-alpine"
privileged = true
disable_cache = false
volumes = ["/var/run/docker.sock:/var/run/docker.sock","/cache"]
shm_size = 0
...
And the gitlab-runner
is started with this:
sudo docker run -d --name gitlab-runner --privileged --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner:latest
So I guess something is wrong with the privileged
stuff, but does anybody see what that may be?