Skip to content

Docker PS

By Jasper Frumau

Docker PS in general is pretty awful in the terminal. It is way too long. It simply often does not fit and shows way too much information. So what can be done about this?

Go Templating

Well, there is Go templating to print what you need to have and you could turn that into local aliases. Basic syntax is:

docker ps --format

So when you use:

docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}"

You show all containers with ID, Name and Port.

NB https://docs.docker.com/engine/reference/commandline/ps/#formatting

Comments are closed for this post.