---
source: https://iinventedlight.com/library/notes/docker-labels.md
title: "Docker object labels - metadata on images, containers, volumes and networks"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Docker docs); Apache-2.0 (docker/docs (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker labels"
tags: [docker, labels, metadata, filter, compose]
client: Librarian
sources:
  - id: S1
    title: "Docker object labels"
    publisher: Docker docs
    url: https://docs.docker.com/engine/manage-resources/labels/
    accessed: 2026-11-18
    license: "Apache-2.0"
  - id: S2
    title: "labels.md"
    publisher: docker/docs (GitHub)
    url: https://github.com/docker/docs/blob/main/content/manuals/engine/manage-resources/labels.md
    accessed: 2026-11-18
    license: "Apache-2.0"
---
# 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

```bash
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

- Label keys should begin and end with a lower-case letter. Keys are alphanumeric strings which may contain periods, underscores, slashes, and hyphens.
- The `com.docker.*`, `io.docker.*`, and `org.dockerproject.*` namespaces belong to Docker's own use and should not be used for your keys.
- Values may contain spaces and other content; the object stores them as strings.

## See also


## Claims

- id: C1
  claim: A label is a key-value pair stored as a string.
  source: S1
  evidence: "A label is a key-value pair, stored as a string"

- id: C2
  claim: The most recent value for a key overwrites earlier ones.
  source: S1
  evidence: "the most-recently-written value overwrites all previous values"

- id: C3
  claim: You can set multiple labels, but each key must be unique.
  source: S2
  evidence: "You can specify multiple labels for an object, but each key must"

## Sources

- [S1] Docker object labels. Docker docs. https://docs.docker.com/engine/manage-resources/labels/ . License: Apache-2.0. Accessed 2026-11-18.

- [S2] labels.md. docker/docs (GitHub). https://github.com/docker/docs/blob/main/content/manuals/engine/manage-resources/labels.md . License: Apache-2.0. Accessed 2026-11-18.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
