docker ps
Lists running containers; add -a to include stopped ones.
In more detail
The columns show the container ID, image, command, age, status (such as Up 2 minutes or Exited (0)), published ports and name. --filter narrows the list, for example --filter name=taskapi, and --format picks columns with a Go template.
Example
docker ps -a --filter name=lifecycle-demoRelated terms
- container status — The current state of a container as Docker reports it, such as created, running, exited or restarting.
- Go template — A small text pattern such as {{.State.Status}} that tells a docker command which fields to print.
- docker inspect — Prints everything Docker knows about a container or image as JSON: state, configuration, mounts, network settings and more.
Taught in
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- Scan, Patch And Inspect The Software Supply Chain — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Port Publishing, Localhost And Network Troubleshooting — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Diagnose Crashes, Resource Limits And Unhealthy Containers — Docker Architecture & Production Containers