Has anyone trying to build/send a flow(docker storage) from github-runner? Basically, this is what I’m doing:
• prefect up and running on k8s
• trigger a build by pushing a flow to github on specific branch
• a self hosted github-runner on k8s that is waiting to exec a job
◦ github runner has docker in docker enabled and can communicate with prefect-server-apollo api
◦ prefect is installed on my github-runner
◦
which it should build as docker storage
when ever my github-runner exec
python flow.py
, it won’t build the docker image for me here is the error message:
Copy code
<http://localhost:2376/version>: Bad Request ("b'Client sent an HTTP request to an HTTPS server.'")
Any thoughts/suggestions would be much appreciate it!
k
Kevin Kho
05/09/2022, 8:48 PM
Hey @ek, is that port right though and the issue is just this HTTP/HTTPS mismatch? When you get the chance, could you move the stacktrace to the thread so we don’t crowd the main channel?
def CIDocker(**kwargs) -> Docker:
import docker
default_client = docker.from_env()
# This will break local runs which makes me think this *may* be CircleCI specific
if default_client.api.base_url != "<http+docker://localhost>":
kwargs.setdefault("base_url", default_client.api.base_url)
kwargs.setdefault("tls_config", docker.TLSConfig(default_client.api.cert))
return Docker(**kwargs)
e
ek
05/10/2022, 3:41 AM
That was exactly what I needed! Thank you @Zanie you saved my day!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.