Home / Companies / Spacelift / Blog / Post Details
Content Deep Dive

Docker Ps Command – When to Use & Examples

Blog post from Spacelift

Post Details
Company
Date Published
Author
James Walker
Word Count
1,520
Language
English
Hacker News Points
-
Summary

Docker's "docker ps" command is essential for developers working with containerized apps, as it provides a list of the containers on your machine. It can be used to check whether a container is running, display container sizes, and find stopped containers that need restarting or removal. The command has various options such as -a (--all) flag to view stopped containers, -n/--last flag to view recently created containers, -l/--latest flag for the most recent container, and -s/--size flag to inspect container sizes. Additionally, docker ps supports filters and formatters to customize output and make it easier to manage containers effectively.