📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Docker Docker Labels

Docker Labels

3 min read
Add metadata labels to images and containers for filtering, auditing, and CI/CD tracking.

Docker Labels

# In Dockerfile
LABEL maintainer="alice@example.com"
LABEL org.opencontainers.image.title="My App"
LABEL org.opencontainers.image.version="1.0.0"

# At build time
docker build --label git.commit=$(git rev-parse HEAD) -t myapp .

# Filter by label
docker ps --filter label=env=production
docker images --filter label=maintainer=alice@example.com

# Read labels
docker inspect --format={{json .Config.Labels}} myimage