gitlab docker 自动部署报错 /bin/bash: line 118: docker: command not found

原因找不到docker,我们需要绑一下docker

列出所有gitlab-runner配置文件

find / | grep config.toml

[root@izwz99pke7zxkpm7l51t8jz ~]# find / | grep config.toml
/srv/gitlab-runner/config/config.toml
/var/lib/docker/volumes/gitlab-runner-config/_data/config.toml
/var/lib/docker/overlay2/b06ff5242ee208ee1eaa4b205801ed5daa193056526c0a01ced53dd821d28f8a/diff/etc/gitlab-runner/config.toml
/var/lib/docker/overlay2/7e84218ced6b73451784136503a22c51af06aa417e78c5ba7c29239046e9b985/merged/etc/gitlab-runner/config.toml

编辑第一个配置文件, 找到 volumes 加入 "/usr/bin/docker:/usr/bin/docker", "/var/run/docker.sock:/var/run/docker.sock"

vim /srv/gitlab-runner/config/config.toml

[root@izwz99pke7zxkpm7l51t8jz ~]# vim /srv/gitlab-runner/config/config.toml
volumes = ["/cache","/usr/bin/docker:/usr/bin/docker", "/var/run/docker.sock:/var/run/docker.sock"]
上一篇:Idea工具将工程代码提交到Github上


下一篇:windows 根据端口查看进行PID 并杀掉进程