jesseduffield / lazydocker

The lazier way to manage everything docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility with colima

akshayamaldhure opened this issue · comments

I've replaced Docker Desktop with lima/colima. All the docker cli commands work fine. However, running lazydocker returns this.

$ lazydocker
2022/02/11 10:57:31 connection to docker client failed. You may need to restart the docker client

I tried restarting colima, but no luck.

@akshayamaldhure I found a work around .

  1. Find out your local unix socket via : docker context ls .You need docker endpoint something like unix:///Users/youruser/.colima/docker.sock
  2. Point DOCKER_HOST variable before invoking lazydocker :
DOCKER_HOST=unix:///Users/youruser/.colima/docker.sock  lazydocker
  1. Profit ?

That works. Thanks a lot! 🙇‍♂️

This can be done automatically with

export DOCKER_HOST=$(docker context inspect | jq '.[] | select(.Name == "'$(docker context show)'") | .Endpoints.docker.Host' -r)
set -gx DOCKER_HOST (docker context inspect | jq '.[] | select(.Name == "'(docker context show)'") | .Endpoints.docker.Host' -r)
ezoic increase your site revenue