Docker / Compose

Docker / Compose: docker compose ls — Linux

List running Compose projects and their status.

Availability: Tool and version dependent; install separately where required.中文

Syntax

docker compose ls [OPTIONS]

Examples

List running Compose projects.

docker compose ls

Include stopped Compose projects.

docker compose ls --all

Show projects whose status is running.

docker compose ls --filter "status=running"

Print project information as JSON.

docker compose ls --format json

Parameters, options and clauses

Option / clauseDescription
-a, --allShow all Compose projects, including stopped projects.
--filter <filter>Filter projects by a condition, for example status=running.
--format <format>Choose table or json output. Default: table.
-q, --quietPrint project names only.

Output fields

FieldDescription
NameCompose project name.
StatusCurrent project state, for example running or exited.
Config FilesPaths to the Compose files associated with the project.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory