Hacker News new | past | comments | ask | show | jobs | submit login
Lazydocker: a lazier way to manage everything Docker (github.com/jesseduffield)
481 points by mottiden on July 18, 2023 | hide | past | favorite | 73 comments



Also has lazynpm & lazygit, which are similar-at-first-blush TUI (terminal UI) systems. https://github.com/jesseduffield/lazynpm https://github.com/jesseduffield/lazygit

That ability to navigate & go anywhere (lots of linkability) feels like something the web should be great at. But most interfaces (web or anywhere) tend towards heavy modal behaviors: they only do one thing at a time, have specific navigation affordances to get you to the next view. Having a couple different panes always-onscreen with some dedicated different bits of context in them feels sharp/smart!


I don't know if it's helpful to you or anyone else here, but I started recently to mainly navigate the we with Ctrl-F and tab/shift-tab in my browser (Firefox so far but thit works with Chrome too). I find it's more convenient.

For example:

1. Open Google in a new private/incognito window.

2. Ctrl-F "accept all" or a substring of that.

3. Press escape.

4. Press tab/shift-tab to find out where you are (Chrome and Firefox would be focused at different but similar places right now) and navigate to the "accept all" button.

5. Enter to accept.

You can do the same for links (the Google website is just an example). If you type "json wikipedia" in Google search and press enter to go to the results page, you can:

1. Ctrl-F "json - w"

2. Press escape and then enter to go to the highlighted link (in this case, the Wikipedia article on JSON).

I still have to reach for the mouse sometimes, but I find it helpful for reducing reliance on it/context switching and you/others might too.


Like Quick Find? The apostrophe? '

I agree this style of navigation is great. I don't know if it's in Chrome, though.


Try surfingkeys. You'll likely like it.


Thanks! It looks interesting. I’ll try it out hopefully. I did try a Vim-style extension out once but don’t remember why I didn’t stick with it.


Related:

Lazydocker: The lazier way to manage everything Docker - https://news.ycombinator.com/item?id=29400741 - Dec 2021 (17 comments)

Lazydocker: a terminal GUI for Docker - https://news.ycombinator.com/item?id=20315973 - June 2019 (47 comments)


And like 10 other threads


Other threads with comments? If so, which ones?


There’s a similar tool for Kubernetes called k9s, allowing you to easily see and manage everything in your cluster.


For those of us that use Hashistack, there is Damon, which is like k9s. K9s is the only thing that allowed me to suffer using k8s.

https://github.com/hashicorp/damon


I use Lens (https://k8slens.dev/) but it is dual licensed like VSCode


There is also OpenLens (https://github.com/MuhammedKalkan/OpenLens). And for anyone switching from Lens, pod shell and logs functionality can be found as an extension.


I don't know how I could use K8s without k9s. Great project.


Here is the link of k9s. Great project as well. https://github.com/derailed/k9s


I love it! I searched for a "k9s but for docker" and found lazydocker and ctop. I went with ctop because it looks nice and I don't like terminal programs that use the mouse.


Can you explain why is it useful? I tried kubernetes-dashboard and lens but in the end I've found ordinary kubectl good enough for my needs.


for one you don't have to remember all the kubectl command names

for another it is much faster to do things, a couple abbreviated vi-like commands vs. long commandline args


k9s is great. JetBrains IDEs also come with a really good k8s (and docker) plugin.


I use lazygit made by the same person and it's great.


An absolutely amazing tool. Boosted my work productivity immensely.

If you don't like the usual graphical git clients, but would like some help with some of the tasks that are tedious with just the cli, definitely give it a try.


This is absolutely amazing. I’ve been using vscode for interactive rebasing but it’s annoying since I have to use the vscode terminal. This looks super useful for work.


Just want to appropriate what ziftface said in this comment section.

I never really understood the use case for things like this. You can [do what's needed from regular git commands]. So I'm not really sure why you'd need this.


Ideally, you'd achieve as much as you can with minimal interruption to your main workflow.

With graphical clients, there's some friction, since you have to open the client to the directory you're in; or these interfaces are designed for use mainly with the mouse.

A command line program is right there, especially if you're otherwise using a terminal. -- But, for any commands which require finer things than "add everything", being precise on the command line is generally slow.

To get `git show 14feb20`, or `git add path/to/foo.ext`, it can be quite slow to get those precise values, especially if it involves re-entering a value from the output of a previous command. (It will still be slow, even if you're using tab-completion or fzf or copy-pasting).

Keyboard-driven interfaces like lazydocker or lazygit avoid those disadvantages.


The replies to ziftface also apply here. You can get from point A to point B by walking, what's the use of bicycles, cars or planes?


Interesting. Thanks for that, I usually am pretty charitable with my interpretations of comments - it's curious ziftface didn't consider that.


It's cool watching someone I knew at uni build something that's useful for so many people, especially seeing him pop up on Hacker News from time to time!


Heavy Emacs users may appreciate docker.el, which does a lot of the same things inside Emacs

https://github.com/Silex/docker.el


Lazydocker opens fewer buffers %)

Docker.el would benefit from some more orderly buffer management. At least it would 6 months ago.

Pretty helpful otherwise.


> fewer

Thank you for getting this correct. I have been seeing everyone get this mixed up with "less" lately and it has been driving me insane. it's like almost everyone forgot how to use these words at the same time.


not sure why I got downvoted but I shouldn't be surprised. this site is full of toxic, caustic assholes with superiority complexes.

the same people who downvoted me for not contributing will comment all day while not contributing anything.


Your comment has nothing to do with the real subject here but is just a pessimistic look at language abilities of people.


> pessimistic

realistic. based on observation. a lot of people (a lot) get it wrong. I find it annoying. so "excuuuuuuuse me, princess", I guess.


Nifty. Yep is lazy all right. It works out of the box and let me navigate faster than my crappy bash menu that I use to manage my docker containers.

It reminds me of the joke of the cowboy carrying a squirrel.

Why do you carry that squirrel? people ask him.

He pulls the squirrel out the squirrel and the squirrel would go "tsk tsk tsk"

And the horse started walking :)


>He pulls the squirrel out the squirrel and the squirrel would go "tsk tsk tsk"

I sorry, what did he squirrel this squirrel away in?


lzd with the logs tailed is what I reach for when I want to seem like an insanely busy genius hacker from one of those movies. Stare at your monitor pensively while you have like 5 services running and people will walk away if they've dared to approach you.


This does remind me of ctop as well: https://github.com/bcicen/ctop

It also let's you look at containers, resource usage graphs, their logs and even do some actions through a TUI.


I really like this! This kind of interfaces lets you easily take a glimpse of the system and explore the current state of the system even doing some simple actions.

I've been searching for a while for something like this but more oriented at generic server management (maybe more at the systemd level for example).

I would like a setup where I ssh into a remote server and get directly this kind of interface with monitoring and all of my services current status. And only if needed by pressing some shortcut get into a shell for doing something more specific


Just change your login shell to a script that's a menu. Press 1 for dashboard. Press 2 for shell.


Alternatively, run the dashboard script via SSH to get the output ($ ssh "host" "command").


Thanks for the suggestion but the point was that I still haven't found the dashboard program I was talking about. The shortcut to invoke the shell was just a feature I would like to see present in such a program


Lazy docker have checked out become and on windows at least is far quicker and convenient than the docker desktop client!

I've also been using lazgit for a while now mostly for the diffs and merges more so I find interactive commits and some activities with some finer grain control can be a bit flakey though. Really nice work though and happy with it so far!


> "have checked out become"

?


Sorry was on my phone - I have checked it out before*


This is like k9s [1] but for docker.

[1] https://k9scli.io/


I unironically use this application in my day job, especially for exec-ing into containers (the ‘E’ shortcut is great).


I feel like I saw this randomly on a forum years ago and it's just been part of my top 10 toolkit.


Is there a tool like this but to manage docker compose project?

I have a folder with many project folders containing docker compose files and I would love to easily run start, stop e.g without constantly running cd


You should check out portainer.io


two of my projects might be of interest:

- https://github.com/MoserMichael/dockerdashphp - admin tool for docker with a browser based UI. This tool runs a local web serer in docker container.

- https://github.com/MoserMichael/s9k - admin tool for kubernetes with a brower based UI. This tool runs a local web server in a docker container.


Whoa super interesting, this might replace most of portainer for me.


There's a tool called oxker, https://github.com/mrjackwills/oxker, that I've found works very well. It seems to take up less resources than lazydocker when running on my raspberry pi


I've been using LazyDocker everyday for a couple of years now. Absolutely love it. I got used to it instead of going for the docker commands directly.


I would love to see something similar for systemd!


Lazydocker is really nice, used this a lot.


Does this mean you don't have to have docker desktop installed?


Docker Desktop contains both the engine and the GUI and CLI clients. If you want to avoid installing Docker Desktop, you'd have to install the engine some other way -- natively on Linux/WSL, through Colima on Mac/Linux, or perhaps some alternative docker-compatible runtime like Podman. Lazydocker is just a TUI client for working with a Docker engine.


Rancher Desktop is a great way to do this while avoiding the anti-commercial rules of Docker Desktop -- it is fully OSS (Apache 2.0) and comes with the engine (virtualized on both Windows and MacOS), the CLI, and a (unfortunately limited) GUI client.


Using it for years and loving it!


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


I am an OpenLens fan. Is there an OpenLens-like version of this? Basically full GUI not terminal.

I like the terminal for command-line, but not so much for UI stuff.


I never really understood the use case for things like this. You can get the logs with docker-compose logs and you can see what's running with docker ps. So I'm not really sure why you'd need this.


I can also create applications with enough nand gates. We develop faster and easier ways to do things to become more productive.


How is docker-compose logs analogous to nand gates?


I believe they're talking about how abstractions tend to make people more productive. Operative term being "tend to", because I personally wouldn't use this tool either, but to each their own.


Different strokes for different folks. I thought Portainer and Netdata were overkill the first time I spun them up and now I can't live without them.


I fully agree but the suggestion was that docker-compose logs is like nand gate compared to lazydocker. Seems like a stretch.

Frankly lazydocker looks cool. I think I see the merit as a nice-to-have utility.


Are you trolling?



I mean, with all due respect, but if you cannot see any reason for this to exist, even given the explainer in the readme, then it's clearly not for you. But just because it's not for you doesn't mean I can't be for anyone.


The elevator pitch does a pretty good job of explaining the use case imo.


I read that and even downloaded it and tried it, but like the other commenter said, it's just not for me. I don't see any value added compared to just using the docker-compose and docker commands.

I love this developer's other tool, lazygit, which I use every day. And I can see this one is similar quality, even though it doesn't appeal to me personally. Glad it helps some people out though.


It lets you quickly tab back and forth between different containers and keeps everything on one screen. You could accomplish the same thing by fiddling in tmux, but this has it all ready to go in one command.


These exact points are addressed in the readme. Tldr: windowing, filtering, quick status, etc




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

Search: