List all currently running containers.
docker ps
docker ps shows only RUNNING containers. Use docker ps -a to see all containers including stopped ones. Key fields: STATUS, PORTS, NAMES.
Safety: Inspect state before stopping, pruning, or changing running containers.
List all containers including stopped or crashed ones.
docker ps -a
-a = all (including stopped). Shows exit codes in STATUS column. Common exit codes: 0=clean exit, 1=error, 137=OOM killed (128+9 SIGKILL).
Safety: Inspect state before stopping, pruning, or changing running containers.
List all running containers.
docker ps
Shows only running containers. -a shows all including stopped. Use this as your first check when a container is suspected to have crashed.
Safety: Inspect state before stopping, pruning, or changing running containers.
List all containers including stopped ones.
docker ps -a
Default docker ps hides stopped containers, masking crash loops. -a reveals exit codes and timestamps for forensic triage.
Safety: Inspect state before stopping, pruning, or changing running containers.
Build the habit: DockerDrill drills docker ps and the rest of the Docker workflow until the safe first move is automatic. Try a Docker drill.