gleanerio / scheduler

Scheduling approaches related to gleaner tooling
Apache License 2.0
1 stars 4 forks source link

Use Docker Contexts to set docker endpoints in scripts #34

Closed valentinedwv closed 3 months ago

valentinedwv commented 1 year ago

Need some logic/documentation/ideas

While we can run locally, the configs need to getup to the PORTAINER_URL

So if a PORTAINER_URL is not equal to a Endpoints.docker.Host

toss cookies ;)

It looks like we will need to use docker contexts to set the endpoint for the docker scripts.

(venv) valentin@MacBook-Pro deployment % docker context show                 
desktop-linux
(venv) valentin@MacBook-Pro deployment % docker context inspect desktop-linux
[
    {
        "Name": "desktop-linux",
        "Metadata": {},
        "Endpoints": {
            "docker": {
                "Host": "unix:///Users/valentin/.docker/run/docker.sock",
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/Users/valentin/.docker/contexts/meta/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e",
            "TLSPath": "/Users/valentin/.docker/contexts/tls/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e"
        }
    }
]