Table of Contents

Docker - Containers - List Containers

List all Docker containers by their ID

docker ps -qa

or

docker container ls -qa

returns:

e95f533e272a
e577b06039b9
8e38cc315dc0
f16fe523ce59

List all containers by their size

docker ps -s

or

docker container ls -s

returns:

CONTAINER ID   IMAGE                 COMMAND        CREATED        STATUS       PORTS                                       NAMES              SIZE
8e38cc315dc0   portainer/portainer   "/portainer"   7 months ago   Up 2 weeks   0.0.0.0:9000->9000/tcp, :::9000->9000/tcp   sad_varahamihira   0B (virtual 79.1MB)

List all containers by their name and status

docker container ls --format 'table {{.Names}}\t{{.Status}}'

returns:

NAMES              STATUS
sad_varahamihira   Up 2 weeks