Thuta Learning
BasicDevOps & Toolsintermediate

docker ps

Relax. We'll talk through this in plain words — no textbook voice.

docker ps is used to see which containers are currently running. If you want to check whether a container is running, what port it's mapped to, or what it's named, this is the command to reach for first.

dockerfile
# Show only running containers
docker ps

# Show all containers, including stopped ones
docker ps -a

# Show container IDs only
docker ps -q

docker ps only shows running containers. If you also want to see containers that ran and then stopped, add -a.

You should see
CONTAINER ID IMAGE COMMAND STATUS PORTS NAMES abc123def456 nginx "/docker-entrypoint..." Up 2 minutes 0.0.0.0:8080->80/tcp web-demo

Info

PORTS column showing 0.0.0.0:8080->80/tcp means host port 8080 is mapped to container port 80.

Easy traps

  • Not seeing a container doesn't mean the app doesn't exist — it might just be a stopped container. Check again with docker ps -a.
docker ps | Thuta Learning