docker list stopped containers code example
Example 1: docker stop all
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Example 2: how to get list of docker containers
1. docker container ls -a
2. docker ps -a
Example 3: list stopped containers
docker ps --filter "status=exited"
Example 4: docker list containers
# List curently active containers
$ docker ps
Example 5: docker display stopped containers
#display all containers
docker ps -a