https://prefect.io logo
#prefect-server
Title
# prefect-server
e

ek

05/09/2022, 8:28 PM
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

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?
Do you need TLS like mentioned here ?
e

ek

05/09/2022, 9:25 PM
🤔 I would think prefect is using python-docker as a dependency, how can I change that config tho?
k

Kevin Kho

05/09/2022, 9:27 PM
Will trace the code in a bit
🙌 1
z

Zanie

05/09/2022, 11:35 PM
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

ek

05/10/2022, 3:41 AM
That was exactly what I needed! Thank you @Zanie you saved my day!
👏 1
20 Views