Docker Community Forums

Share and learn in the Docker community.

Docker ps, shows only the last few dead containers


#1

Anyway to make docker ps or docker service ps show all dead containers since the big bang?


#2

While docker ps should show only running containers. If you append -a, you will see the stopped containers as well. docker service ps lists services and their tasks, which includes running an ended tasks.

It depends on what you mean by big bang and if you use a restart policy that restarts a dead container in you big bang scenario. You could check the past events of the docker engine: docker events. If you set your filters right, you might/should be able to get the information you need (see: https://docs.docker.com/engine/reference/commandline/events/#filter-events-by-criteria).