作者:Cika_用假名说真话 | 来源:互联网 | 2022-12-15 06:29
我有一个附加服务的GitLab Runner的问题.每当作业运行时,一旦等待服务完成,它就会给我一个警告:
ContainerStart:来自守护进程的错误响应:无法链接到非运行容器:/ runner-b565e58e-project-4-concurrent-0-mysql-0 AS/runner-b565e58e-project-4-concurrent-0-mysql-0-wait - 用于业务/服务
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
...
并gitlab-runner
开始与此:
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
所以我猜这些东西有问题privileged
,但是有人看到了那可能是什么吗?