[英]Docker not working in gitlab runner, what could be the problem?
When I try to run my gitlab-ci.yml
, I get the following error: 当我尝试运行
gitlab-ci.yml
,出现以下错误:
/bin/bash: line 73: docker: command not found
/ bin / bash:第73行:docker:找不到命令
On my server the docker
command works as root and gitlab is also executing as root. 我的服务器上的
docker
命令用作根和gitlab也被执行为根。
What could be the problem here? 这可能是什么问题?
Here is my .yml
file: 这是我的
.yml
文件:
stages:
- deploy
- cleanup
before_script:
- whoami
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
You can verify these 3 steps: 您可以验证以下3个步骤:
Follow the official page for more information: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html 请关注官方页面以获取更多信息: https : //docs.gitlab.com/ee/ci/docker/using_docker_build.html
Your gitlab-ci.yml
looks incomplete. 您的
gitlab-ci.yml
看起来不完整。 Try something like this: 尝试这样的事情:
stages:
- build
build-docker:
stage: build
script:
- whoami
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.