简体   繁体   English

Gitlab-runner:在 root 中找不到 docker 或 docker-compose 但它们已经安装

[英]Gitlab-runner: docker or docker-compose not found in root but they already installed

I've already installed gitlab runner and docker and docker-compose via Sudo in CentOS 7/Ubuntu OS and all pipelines work well but when I active another project to the gitlab-runner then it doesn't recognize anything such as sudo.我已经在 CentOS 7/Ubuntu 操作系统中通过 Sudo 安装了 gitlab runner 和 docker 以及 docker-compose,并且所有管道都运行良好,但是当我将另一个项目激活到 gitlab-runner 时,它无法识别诸如 sudo 之类的任何内容。 and also sometimes the current runner acts like the new gitlab project results, docker or docker-compose and I don't know why?有时当前运行器的行为就像新的 gitlab 项目结果、docker 或 docker-compose 一样,我不知道为什么?

$ whoami
root
$ docker info
/bin/sh: eval: line 59: docker: not found

OR或者

$ docker-compose --version
/bin/sh: eval: line 59: docker-compose: not found

The main problem is we should disable the shared runners because docker and docker-compose or other things is not installed into shared runners.主要问题是我们应该禁用共享运行器,因为 docker 和 docker-compose 或其他东西没有安装到共享运行器中。 so after disabling them, everything will work correctly as well as desired.因此,在禁用它们后,一切都会如预期般正常工作。

The shared runners have disabled in following image:共享跑步者已在下图中禁用:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker-compose postgres卷将所有权更改为gitlab-runner - docker-compose postgres volume changes ownership to gitlab-runner 如何在 gitlab-runner 容器内运行的 docker 中的 docker 中运行 docker-compose? - How to run docker-compose inside docker in docker which runs inside gitlab-runner container? docker-compose 中的 Gitlab-runner 无法连接 http://docker:2375/v1.40/info - Gitlab-runner in docker-compose cannot connect http://docker:2375/v1.40/info gitlab-runner docker:找不到命令 - gitlab-runner docker: command not found Gitlab-runner + Docker-compose部署方案:主机服务器重启后如何正确重启容器 - Gitlab-runner + Docker-compose deploying scheme: how to properly restart containers after reboot of host server maven:来自 gitlab-runner 的最新图像,带有 docker 执行器“无法连接到 gitlab 连接被拒绝”使用 ZBAEDBAE645E0857 - maven:latest image from gitlab-runner with docker executer “Failed to connect to gitlab Connection refused” using docker-compose Gitlab 跑步者 docker 撰写:未找到 - Gitlab runner docker compose: not found 使用 gitlab-runner 和 docker 进行部署 - Deploy with gitlab-runner and docker Gitlab Runner 和 docker/docker-compose 传递存储的 gitlab 变量 - Gitlab Runner and docker/docker-compose passing stored gitlab variables 如何在 gitlab-runner docker 上无根克隆 - how to clone without root on gitlab-runner docker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM