💾 Archived View for laniakea.rodoste.de › journal › 2023-12-08-docker-shortcut.gmi captured on 2024-05-26 at 14:34:51. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-12-28)
-=-=-=-=-=-=-
2023-12-08
I found a simple CLI shortcut for docker.
Actually it is an alias for `docker ps -a` which I do use a lot. Typing this isn't tough but what annoys me is that the default output is too broad and that makes finding the right information in a long list of multi-column output tedious.
It turns out you can tweak the table formatting. The command becomes unwieldy but this is what shell aliases are for so here we go:
alias dls="docker ps -a --format 'table {{.ID}}\t{{.Names}}\t{{.RunningFor}}\t{{.Status}}\t{{.Networks}}'"
It lists everything I need to know and it fits on a half-screen terminal on a full-HD monitor — you know, tmux...
That's it, just a quick one.
---