I'm aware of how to get a list of "container ID's" of all running docker containers.
$ docker ps -q
In Docker, we can use docker ps to show all running containers, docker ps -a to show all running and stopped containers. The ps stands for process status . On Docker, it shows the status of containers along with their IDs.
To list Docker containers, use the docker container ls command or its alias docker ps .
You can use the docker stats command to live stream a container's runtime metrics. The command supports CPU, memory usage, memory limit, and network IO metrics. The docker stats reference page has more details about the docker stats command.
This should do it. Apologies for the slash at the start.
$ docker inspect -f {{.Name}} $(docker ps -q)
/test
/test2
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