Docker How To Check Running Containers
It is easy to check running Docker containers.
To show which containers are running just use the docker ps command like this:
docker ps
If you actually want to see all containers, bot running and stopped, use this command:
docker ps -a
You can see stopped containers like this:
docker ps --filter "status=exited"
You can search for a specific container like this:
docker ps | grep nginx
You can also filter for a specific container:
docker ps --filter name=web1
You can show matching container IDs like this. This is useful if you want to use the output of this command in a script or as a parameter for another command.
docker ps --filter name=web1 -q