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
- id: C1 claim: The --filter flag scopes a command to matching entries. source: S1 evidence: "You can use the --filter flag to scope your commands."
- id: C2 claim: The operator can be equals or not equals. source: S1 evidence: "or not equals ( != )"
- id: C3 claim: Multiple filters can be combined. source: S2 evidence: "You can combine multiple filters"
Sources
- [S1] Filter commands. Docker, Inc.. https://docs.docker.com/engine/cli/filter/ . License: Apache License 2.0. Accessed 2026-11-26.
- [S2] Filter commands (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/cli/filter.md . License: Apache License 2.0. Accessed 2026-11-26.
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
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.},
}
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.
- docker-cli-filter.schema.json (schema; CC-BY-4.0)
- docker-cli-filter.table.json (table; CC-BY-4.0)
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.