Has anyone trying to build/send a flow(docker stor...
# prefect-server
e
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 ◦
~/.prefect/config.toml
looks like this:
Copy code
backend = "server"
[server]
endpoint = "<http://prefect-server-apollo.prefect-server:4200>"
• in
.github/workflows/build.yml
, execute
python flow.py
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
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?
Do you need TLS like mentioned here ?
e
🤔 I would think prefect is using python-docker as a dependency, how can I change that config tho?
k
Will trace the code in a bit
🙌 1
z
We also do something like this internally
Copy code
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
That was exactly what I needed! Thank you @Zanie you saved my day!
👏 1