Show stopped Docker containers

Like you said docker ps -a will show stopped and running containers (all the containers). The following command will only show you the stopped containers.

docker ps -a | grep Exit

Now your able to perform docker logs container-id on your container to see what is going wrong.


Well you gave yourself the answer:

Info of Container

To show running Containers. With -a option, it shows running and stopped Containers.

docker ps

So try

sudo docker ps -a

If docker ps -a isn't showing anything after a machine restart, try restarting the Docker daemon (happens sometime to me too after a shutdown).

Tags:

Docker