Docker gives you a way of listing running containers or all containers including stopped ones.
This can be done by:
$ docker ps # To list running containers
Or by
$ docker ps -a # To list running and stopped containers
Do we have a way of only listing containers that have been stopped?
Only stopped containers can be listed using:
docker ps --filter "status=exited"
or
docker ps -f "status=exited"