hello, I am trying to push my code on Gitlab but it constantly fails on the push stage giving me the below error. I would really appreciate any suggestions of how to tackle this issue…
1 Running with gitlab-runner 12.6.0-rc1 (ec299e72)
2 on docker-auto-scale 72989761
3
Using Docker executor with image ruby:2.5 ...
00:33
4 Pulling docker image ruby:2.5 ...
5 Using docker image sha256:54cb86b0bcdc353e103e9dd1bff69fcd01e3235420ed17cbf5efac22010b373e for ruby:2.5 ...
7
Running on runner-72989761-project-16129735-concurrent-0 via runner-72989761-srm-1578007908-e356a4c4...
00:05
9
$ eval "$CI_PRE_CLONE_SCRIPT"
00:01
10 Fetching changes with git depth set to 50...
12 Created fresh repository.
14 * [new ref] refs/pipelines/106725538 -> refs/pipelines/106725538
15 * [new branch] master -> origin/master
16 Checking out 4620472d as master...
17 Skipping Git submodules setup
21
$ docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
00:01
22 /bin/bash: line 89: docker: command not found
26 ERROR: Job failed: exit code 1
hello Michael, thank you for your reply.
Please let me know what you think the issue could be, I’m only a beginner, so I’m not sure what may be causing it and I spent a lot of time researching this but no luck (I kept creating and deleting projects to see if sth could work).
current issue in the Push stage:
1 Running with gitlab-runner 12.6.0-rc1 (ec299e72)
2 on docker-auto-scale 72989761
3
Using Docker executor with image ruby:2.5 ...
00:37
4 Pulling docker image ruby:2.5 ...
5 Using docker image sha256:54cb86b0bcdc353e103e9dd1bff69fcd01e3235420ed17cbf5efac22010b373e for ruby:2.5 ...
7
Running on runner-72989761-project-16138356-concurrent-0 via runner-72989761-srm-1578057356-89d9bc73...
00:05
9
$ eval "$CI_PRE_CLONE_SCRIPT"
00:02
10 Fetching changes with git depth set to 50...
11 Initialized empty Git repository in
12 Created fresh repository.
13 From
14 * [new ref] refs/pipelines/106836401 -> refs/pipelines/106836401
15 * [new branch] master -> origin/master
16 Checking out 58e0d93f as master...
17 Skipping Git submodules setup
21
$ docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
00:01
22 /bin/bash: line 89: docker: command not found
26 ERROR: Job failed: exit code 1
did you build that setup yourself, or where did you copy the parts? From a first peek, it looks like as if the GitLab runner is configured to use the ruby image as default, and none of .gitlab-ci.yml references a different Docker image.
Using Docker executor with image ruby:2.5 ...
This works fine up until you’re calling the build job - which calls the docker CLI command but Docker isn’t installed inside the container.
Funnily enough the push image job works, but push latest fails.
I built the project with my team mates - it was a final project for a course I attended and it worked just fine but then I wanted to launch it on my own domain & in my private Gitlab (not the school dedicated one) and ever since then I have had this problem. I have just updated default.conf file with my domain and the pipeline broke on the lint stage with the same ‘docker: command not found’ error…
Ok, I managed to solve this issue - it was caused by the fact that the shared runners were activated (hence gitlab was using ruby instead of shell executor which I chose initially when setting up gitlab runners). uff… thank you so much for your willingness to help, Michael, I appreciate it.
Ah. Shell executor. Now that makes sense, it would have been my next guess that the runner setup now differs Glad you’ve solved it yourself, nifty CI pipeline overall
Hello, in my case, I went to my project Settings on Gitlab - CI/CD - Runners - deactivate Shared Runners. This solved the issue. I hope it fixes it for you too.
Hi, I am also new to this. And if I disable shared runner then it mentions that no runner found.
My code:
gitlab stages
docker-test:
stage: docker-test
script: docker info # working fine
integration-test:
image: gradle:alpine
stage: integration-test
script:
- gradle itest --info # not working
Hi Michael,now I have the same issue,and I used the Docker executor with image ruby:2.6,the issue comes when I use it in gitlab-ci.yml。。。。May I ask your help?
I encountered a similar error during my CI/CD pipeline execution:
$ echo “Executing CI/CD pipeline”
Executing CI/CD pipeline
$ echo “$CI_REGISTRY_PASSWORD” | docker login -u “$CI_REGISTRY_USER” --password-stdin $CONTAINER_REGISTRY
/usr/bin/bash: line 140: docker: command not found
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1