441 words
2 minutes

Docker for Girls - Understanding docker ps Once and For All

By · Developer Advocate · Docker Captain · IBM Champion
Silver Apple iMac centered on a bright wood desk showing a mountain-and-lake landscape wallpaper, with a white keyboard and mouse on a black round mousepad, a white mug, and a brass lamp

Hey girls! 💖

If you’re as passionate about IT and Docker as I am but sometimes find it a bit complicated, don’t worry! Today, I’ll explain the super-important docker ps command in a way that anyone can understand! 😉

What is docker ps?#

This command shows all the containers on your computer. It tells you which ones are running, which ones are stopped, and what their settings are. Think of docker ps as your list of all containers—just like a list of open tabs in your browser. 🖥️

When Should You Use docker ps?#

You use docker ps when you want to:

  • See which containers are currently running.
  • Find out which containers have stopped.
  • Get the ID or name of a container.
  • Check which ports are open.
  • View the size of a container.
  • Check if a container is healthy (yes, containers can have bad days too!).

How to Use docker ps (Examples)#

The Simplest Command:#

Terminal window
docker ps

Shows only running containers.

Want to See All Containers, Even Stopped Ones?#

Terminal window
docker ps -a

Now you can see both running and stopped containers. The STATUS column will show why a container stopped (e.g., due to an error or just being turned off).

How to View the Last Created Container?#

Terminal window
docker ps --latest

Great for checking if the most recently created container is working properly.

How to Check How Much Space a Container is Using?#

Terminal window
docker ps -s

This helps when your disk space is running low. 🧹

How to See Only Container IDs?#

Terminal window
docker ps -q

Useful when you need container IDs without extra details.

Filtering docker ps#

To quickly find the container you need, use filters:

🔍 Find a container with a specific label:

Terminal window
docker ps --filter label=app=my-app

🔍 Show containers created before a specific one:

Terminal window
docker ps --filter before=my-app-container

🔍 Find containers using a specific volume:

Terminal window
docker ps --filter volume=my-volume

🔍 See containers in a specific network:

Terminal window
docker ps --filter network=my-network

How to Change docker ps Output?#

By default, docker ps outputs a table, but you can customize what is displayed:

Terminal window
docker ps --format 'table {{.ID}}\t{{.Image}}\t{{.Status}}'

This will show only the container ID, image, and status.

Want JSON format? Easy:

Terminal window
docker ps --format json

Pro Tips!#

✨ Don’t forget about -a: If a container stops, docker ps won’t show it by default, so use docker ps -a.
Set up your favorite commands: For convenience, create aliases for frequently used commands.
Monitor container sizes: Keep only the necessary containers to avoid wasting disk space.

Conclusion#

The docker ps command is your go-to tool for managing containers. Now you know how to check which containers are running, which have stopped, and how to filter them. Easy, right? 😉

I hope this guide helped! If you have any questions, feel free to ask—I’m always happy to chat about Docker. 💻💖

See you soon, IT girl! 🚀


Tatiana Mikhaleva

Docker Captain  ·  IBM Champion  ·  AWS Community Builder

DevOps.Pink — Signal over noise in cloud-native & AI.

Pink Signal

The cloud-native stack, without the gatekeeping

Docker, Kubernetes, and the agentic-AI era — hands-on and clearly explained, for engineers who actually ship. Pink Signal lands in your inbox when there's something worth knowing.

Related Posts

Same category
  1. 1
    The Terminal Was Never the Point: Managing Parallel AI Coding Agents
    DevOps & Cloud · Claude Code, Codex, and Copilot agents now edit your repo in parallel, and a terminal shows one at a time. Why visual Git tooling became the control tower.
  2. 2
    The Runbook You Didn't Write Is Already Running in Production
    DevOps & Cloud · Your vendor's opinion of how to run their product now ships as an executable AI agent skill. Six places it breaks in production, and six questions to ask first.
  3. 3
    The Industry Is Hiring DevRel for Yesterday
    DevOps & Cloud · Developer Relations builds the AI future, then hires its advocates with 2012 HR scripts. Eight symptoms of DevRel hiring broken by fear, and the fix.
  4. 4
    How to Secure AI Agents in Production: IBM's Six-Phase Framework
    DevOps & Cloud · Teams secure AI agents like normal software, and production breaks. Here's IBM and Anthropic's six-phase framework for securing them, phase by phase.

Random Posts

Random
  1. 1
    Git Merge Conflicts for Beginners - What to Do When Your Branches Have Beef
    DevOps & Cloud · Learn how to fix Git merge conflicts step-by-step. A fun, beginner-friendly guide to resolving and avoiding conflict errors in your branches.
  2. 2
    DevSecOps Explained - Security for DevOps in 2025
    DevOps & Cloud · A no-fluff DevSecOps guide for DevOps engineers. Learn how to build secure pipelines, protect secrets, and integrate security from day one.
  3. 3
    Mastering archive_file in Terraform Like a Pro
    DevOps & Cloud · Learn how to use Terraform's archive_file to create ZIP & TAR archives for AWS, Kubernetes, and Azure. Get step-by-step guides and troubleshooting tips!
  4. 4
    CNCF Q1 2026 Report — Why Feature Flagging Is the Hidden Gateway to Cloud Native Maturity
    DevOps & Cloud · CNCF Q1 2026 cloud native report analysis — why feature flagging is the bridge from mainstream to advanced practice, with commentary from the author.
Docker for Girls - Understanding docker ps Once and For All
https://devops.pink/docker-for-girls-understanding-docker-ps-once-and-for-all/
Author
Tatiana Mikhaleva
Published
2025-03-07
License
CC BY-NC-SA 4.0