Hacker News new | past | comments | ask | show | jobs | submit login

I like lazydocker, but I really wish it understood Docker contexts without having to set `$DOCKER_HOST`.

I switch between Colima[0] and OrbStack[1] and have multiple Colima virtualization profiles[2] (one with `vz`, one without), resulting in multiple Docker contexts. I have a function that I’ve written to set docker host, but I have to remember to clear it after I’m done using lazydocker and a couple of other tools (dive, I think).

    function set-docker-host
        command -sq docker
        and command -sq jq
        or return 1

        set -l host (
          docker context ls --format '{{ . | json }}' |
            jq -sr '.[] | select(.Current == true) | .DockerEndpoint'
        )
        or return 1

        set -gx DOCKER_HOST $host
    end
The bash/zsh equivalent wouldn't be too hard, but I use fish.

[0] https://github.com/abiosoft/colima, https://hn.algolia.com/?q=https%3A%2F%2Fgithub.com%2Fabiosof...

[1] https://orbstack.dev [3], https://hn.algolia.com/?q=https%3A%2F%2Forbstack.dev

[2] https://github.com/abiosoft/colima#customizing-the-vm and https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#edi...

[3] I’m on OrbStack now, but it isn’t so much better at how I use Docker than Colima is that I think that it’s an instant buy, especially with the planned subscription model. If I used anything other than the Docker integration, I might think it's better, but as of right now, no.

I also have some issues with its insistence on asking for elevated permissions. I will never grant permission[4] to make a symlink to the "standard" Docker socket; context and `$DOCKER_HOST` work well enough. It should not ask if the permission hasn't been given once. I also worry about other "advanced" features that may need an elevated permissions helper[5].

[4] https://github.com/orbstack/orbstack/issues/281#issuecomment...

[5] https://github.com/orbstack/orbstack/issues/281#issuecomment... and following




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: