Ad space (banner)
AD

Got the fundamentals? A structured Docker course is a fast way to level up.

Find Docker courses on Udemy

Affiliate link. Costs you nothing extra.

🐳Docker Lessons
Lesson 10 / 45

Listing Every Container with docker ps -a

When you want to see stopped containers too, add -a. Short for "all," it lists every container regardless of state.

The syntax is docker ps -a. Stopped containers show a STATUS of Exited.

Running docker ps -a lists running and stopped containers together, so you can see everything you have created.

A common stumble is discovering dozens of forgotten stopped containers. They still occupy disk, so clear them out periodically with docker rm or docker system prune.

In real work, it is how you find a container that exited unexpectedly so you can read its logs.

Docker
Try it (type this into the pseudo terminal)
docker ps -a

🧑‍💻 You can type this command into the Docker pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)