Statically compiled docker binary

Hi, I am running a testsuit on Github Actions that includes starting a Jenkins server inside a docker container and have it do a small docker build. Until a few weeks ago I did that successfully by mounting the docker socket and the docker binary from the host into that container. At some point the docker binary suddenly was not statically compiled anymore, thus mounting that binary did not work. In other environments I would simply download a statically compiled docker client that matches the version of the docker daemon. Here on github actions this does not seem to work as the version currently is “19.03.12+azure” for which I do not have a statically compiled matching binary. Any ideas?


From the current comments you posted, we can’t get more information about your workflow.
If possible, please share your repository and the link of the failed workflow run with us, so that we can check more detailed configurations in your workflow to analyze the root cause.

In addition, according your current comments, you may need using service containers in your workflow. For more information, see “About service containers”.

I doubt that more information on the workflow is helpful. Anyway, here the link to a failed build. The error message that says /usr/local/bin/docker: No such file or directory happens because the file exists (I mounted it from the host into the container) but it is not statically compiled.
I am not sure how “service containers” can help with my problem, I use docker-compose and docker run -d commands to start my services and that works well on my laptop as well as on Github Actions.


Did you try to set the volumes in the docker-compose?
Typically the installation directory of Docker on the GitHub-hosted Linux runner is fixed. Maybe you can try directly set the volume in the docker-compose.

Sorry I am lost. I am not sure what volumes can help here.


The directory “/usr/bin/docker” get via the command “which docker” is not the actual installation directory of Docker on the latest GitHub-hosted Ubuntu runner.
The actual installation directory of Docker is “/var/lib/docker”. You can get this path via the command “docker info”, and in the output of this command you can see this:

Docker Root Dir: /var/lib/docker

There seems is a files link (symbolic link) between “/usr/bin/docker” and “/var/lib/docker”. When you mount the volumes on the container, you can try using the directory “/var/lib/docker” instead of “/usr/bin/docker” to see if the error can be solved.