Act Runner in k8s fail to connect to docker daemon

I have successfully provisioned an act runner using docker compose on my host using documentation from

I have also found examples of people running custom docker dind containers that run act runner along side dind. I have this type of act runner running in a k8s cluster.

I install docker and buildx in my action workflow before trying to build a dockerfile.

What I cannot get to work is if the workflow includes buildx it fails to run in the k8s cluster.

In k8s act runner with dind when the workflow with buildx runs it cannot connect to docker daemon either using socket file or localhost:2375.

I am trying to understand what I am overlooking where the action workflow is running as a container “on the host” using the docker:// syntax for the label and buildx cannot reach the docker daemon.

I found this helpful for k8s/k3s setup:

Thanks, I had come across that guide which eventually seems to just abandon buildx for docker. I am running full k8s, not k3s, so I’ve not seen any filesystem errors.

The link to the k8s act runner is very similar to what I have running. The docker socket is reachable by the act-runner at tcp://localhost:2375.

What I’m stuck on is when I launch buildx it complains it cannot reach the docker socket even if I try different values and I think the localhost:2375 makes sense in a DinD pod.

docker buildx create --config ./buildkitd.toml tcp://localhost:2375

So I think I’m stuck trying to understand how to present the dind localhost:2375 within an act-runner workflow container which I assume is running in the DinD container?

I wish to use buildx as I want to use caching and cross-platform (QEMU) builds for amd64 and arm64 on amd64 nodes.