Wait for Docker daemon in DinD sidecar container

Hey everyone!

We run our Jenkins workers as Kubernetes Pods using the Jenkins Kubernetes plugin. We run the jnlp container and a dind (Docker-in-Docker) container as a sidecar.

Sometimes our jobs fail, because of issues with the Docker daemon. We found out, that the issue comes from the Docker daemon not started up properly when the actual pipeline tried to access it.

Our current quick-fix is adding a 5 second wait in the beginning of every job to make sure the daemon is started up properly before the actual pipeline code starts.

easiest solution might be to use a readiness probe on the Docker port and delay readiness until it is up. But unfortunately the plugin only supports liveness probes. There is an open, but apparently dead PR to fix this (Adds support for readiness probe by geanpalacios · Pull Request #1322 · jenkinsci/kubernetes-plugin · GitHub).

Is there any other way to implement this? If not, would it make sense to re-open the PR?

Thanks in advance!