Make your own “docker ps”

Micha(el) Bladowski
2 min readNov 8, 2023

Use “your” format and colors

generated with DALL-E 3

Just a short posting because I don’t want to put this into a non-readable tweet.

This is just an example of reformatting the output of any script.
But in this case, we tailor our very own “docker ps” command made for
small screens to get a compact colored output.

Maybe you run a terminal with 30% the size of your screen or you are forced to connect to a server with your mobile or you like colors in general,
there are enough reasons :-)

So, let’s watch the regular “docker ps” output that does not fit on the screen:

This doesn´t look nice. Let’s pretend the screen is even smaller:

Nothing new. Output like that looks terrible and is super hard to read.
So let’s make a tiny bash script that removes everything we don´t want to see, brings some colors in, and makes the output compact, like this:

Better, don´t you think so? ;-)

You can find the script here.

In case you liked it, feel free to 👍

If you are interested in topics like #devops, #php, #laravel, #ai, and all that nerd stuff, feel free to follow me here or at: ✖️Ⓜ️🔗in

--

--