← All notes

Docker object labels - metadata on images, containers, volumes and networks

Answer: A label is a key-value pair, stored as a string, used to apply metadata to Docker objects. You can specify multiple labels for an object, but each key must be unique; the most-recently-written value overwrites all previous values.

Examples

docker run --label com.example.team=search --label env=prod myapp
docker ps --filter "label=env=prod"
docker images --filter "label=com.example.team"

# Dockerfile
# LABEL com.example.version="1.2.3" com.example.release-date="2026-11-18"

Key rules

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 docs, Docker object labels; docker/docs (GitHub), labels.md. 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 docs, Docker object labels; docker/docs (GitHub), labels.md. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:4p1b4f3b

iinventedlight. 2026. "Docker object labels - metadata on images, containers, volumes and networks." iinventedlight Library, iil:note:4p1b4f3b, version of 2026-11-18. https://iinventedlight.com/library/notes/docker-labels/. License: CC-BY-4.0.

@misc{iil_note_4p1b4f3b,
  author = {{iinventedlight}},
  title = {{Docker object labels - metadata on images, containers, volumes and networks}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/docker-labels/},
  note = {Permanent ID iil:note:4p1b4f3b. 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).

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