Skip to content

Support Docker daemon contexts #332

Description

@wjam

What happened:

Given the licensing around Docker desktop, I make use of Colima to run/manage Docker. Colima puts the Docker socket in ~/.colima/default/docker.sock and sets the currentContext in ~/.docker/config.json to colima. This means that there's no socket at the usual locations and so GetClient fails as it's unable to connect.

What you expected to happen:

stereoscope should support currentContext to discover the location of the Docker socket rather than assuming it's at /var/run/docker.sock

How to reproduce it (as minimally and precisely as possible):

  1. Use colima to manage Docker, rather than host.
  2. Make sure DOCKER_HOST is unset
  3. Attempt to do something like stereoscope.GetImage("docker:ghcr.io/wjam/caddy-with-cloudflare:v0.0.4")

Anything else we need to know?:

A workaround for this is to set DOCKER_HOST to the correct location.

Environment:

  • OS (e.g: cat /etc/os-release or similar): Both latest macOS and Ubuntu 24.04.1 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions