Is it possible - and if yes, how - to have a self-refreshing view of current Docker containers printed by "docker ps" alike top/htop utilities?
In order to list the Docker containers, we can use the “docker ps” or “docker container ls” command. This command provides a variety of ways to list and filter all containers on a particular Docker engine.
The docker ps command, which is available inside the container, is used to see the status of the process. This is similar to the standard ps command in the Linux environment and is not a docker ps command that we run on the Docker host machine.
There is no difference between the docker ps (docker process status) and docker container ls (docker container list) commands in terms of functionality. They even allow the same set of flags. The only real difference between the two is the fact that the latter is newer and more verbose than the former.
Creates containers for a service. Receive real time events from containers. Execute a command in a running container. Force stop service containers.
Use watch
:
watch docker ps
See man watch
Few options:
You can try command docker stats
, which will give you some details about current running containers id, cpu%, memory etc. Something similar to top/htop
which you asked for.
Command docker top CONTAINER [ps OPTIONS]
: It displays the running processes of a container.
There are also some applications available which gives nice view of your docker ecosystem. Eg- Kitematic, Kevana
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With