Open DWSR opened 1 year ago
talosctl
is using docker client library, so it should work pretty much same way as docker
CLI.
I'm not sure if contexts are available in the docker client library, but if they are, it should be an easy fix.
As far as I can tell github.com/docker/docker/client
have nothing related to contexts. docker context
rely on entire cli implementation, which I don't think we should pull as a dependency. We could copy only relevant parts, but that will require a lot of effort now and in the future to support our fork. Other than that, implementation should be relatively straightforward.
PR's are welcome anyway tho.
@DWSR can you please share with me where you set DOCKER_ENDPOINT
? I'm in the same boat of using Colima instead of Docker Desktop but am stuck at the error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
and am looking for next steps.
I tried export DOCKER_ENDPOINT="$HOME/.colima/docker.sock"
but it doesn't work for me... :(
Maybe try ln -s -f /Users/<user>/.docker/run/docker.sock /var/run/docker.sock
as per https://docs.docker.com/desktop/mac/permission-requirements/#installing-symlinks
Instead of adding symlinks, setting the standard DOCKER_HOST
environment variable (not DOCKER_ENDPOINT
as suggested above) works:
DOCKER_HOST=unix:///$HOME/.colima/default/docker.sock talosctl cluster create
Little snippet I made today to make this work
export DOCKER_HOST=$(docker context inspect $(docker context show) --format '{{ .Endpoints.docker.Host }}')
Bug Report
Description
talosctl
does not honour Docker contexts. For example, if the Docker endpoint is non-standard (e.g. when using Colima), thentalosctl
fails unlessDOCKER_ENDPOINT
is set.Logs
Environment
Talos version:
Kubernetes version: N/A
Platform: Docker