-
Bug
-
Resolution: Unresolved
-
High
-
None
-
16
-
Severity 3 - Minor
-
20,811
-
Issue Summary
- Occasionally, users report that they receive the following error when executing their runner builds:
bash: docker: command not found
- This issue is caused by the local Runner directory /tmp/<runner_uuid>/ already containing an empty docker folder.
- We are not yet sure why the Runner directory sometimes already contains an empty docker folder (theory is that it's because of an unsuccessful runner configuration that has not cleaned itself up)
- Since the docker folder already exists, the Runner fails to mount the new docker directory and the docker binary won't be present during the build.
This is reproducible on Data Center: no
Steps to Reproduce
- Execute a build within a dockerized Self-hosted Runner
- Observe the error that occurs (this is intermittent - hard to reproduce)
Expected Results
- The build is able to execute
Actual Results
- The build fails as it is unable to mount the directory
Workaround
- The workaround is described in the following article:
https://confluence.atlassian.com/bbkb/docker-command-not-found-error-while-running-docker-commands-in-self-hosted-runner-1206785605.html
Today, two of my self-hosted runners started showing this error for pipe: trigger-pipeline calls. It was all out of the blue. Both of them left behind an empty docker directory around the same time: 15:57 and 16:00 GMT.
Both runners are sharing the same server, which has 4 runners on it. I'm guessing that if I had enough load, all 4 of them would have shown the symptom.
I deleted both empty docker directories, reran the pipeline, and the pipe failed again, exactly the same way, leaving behind an empty docker directory.
Restarting the runners after deleting the empty directory fixes the issue, and I see an executable file called docker in there.
Do you know what that looks like? Looks like what happens when I docker -v /file/that/does/not/exist:/dest. It would create /file/that/does/not/exist as a directory on the host, and mount it as such.