docker ps

List containers. By default shows only running containers.

Syntax

docker ps [OPTIONS]

Examples

Example 1
docker ps

List running containers.

Example 2
docker ps -a

List all containers including stopped.

Example 3
docker ps --format 'table {{.Names}}	{{.Status}}	{{.Ports}}'

Custom format with names, status, and ports.

Common flags

FlagDescription
-a, --allShow all containers
-q, --quietShow only container IDs
-s, --sizeDisplay file sizes
--formatCustom output format

Tips & best practices

Related commands

View full Docker cheatsheet →