← All notes

Docker CLI filters: scope command output with key-value matches

Answer: The --filter flag scopes Docker CLI commands so the output includes only entries that match a given pattern.

The flag

The flag expects a key-value pair separated by an operator.

The key is the field to filter on, and the value is the pattern that field must match.

The operator can be either equals (=) or not equals (!=).

For example, docker images --filter reference=alpine limits the docker images output to alpine images.

Combining filters

You can combine multiple filters by passing multiple filter flags.

The command then prints only the entries that satisfy the supplied key-value pairs.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Filter commands; Docker, Inc., Filter commands (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Filter commands; Docker, Inc., Filter commands (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:qcnnqd9k

iinventedlight. 2026. "Docker CLI filters: scope command output with key-value matches." iinventedlight Library, iil:note:qcnnqd9k, version of 2026-11-26. https://iinventedlight.com/library/notes/docker-cli-filter/. License: CC-BY-4.0.

@misc{iil_note_qcnnqd9k,
  author = {{iinventedlight}},
  title = {{Docker CLI filters: scope command output with key-value matches}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-26},
  url = {https://iinventedlight.com/library/notes/docker-cli-filter/},
  note = {Permanent ID iil:note:qcnnqd9k. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-cli-filter.md.