Skip to content

docs(compose): single-definition image ref via extension field + anchor - #68

Draft
CybotTM wants to merge 1 commit into
mainfrom
retro/compose-image-anchor
Draft

docs(compose): single-definition image ref via extension field + anchor#68
CybotTM wants to merge 1 commit into
mainfrom
retro/compose-image-anchor

Conversation

@CybotTM

@CybotTM CybotTM commented Aug 27, 2026

Copy link
Copy Markdown
Member

Adds one Compose Essentials bullet: define a shared image reference (path + version variable + default tag) once per compose file as a top-level x-* extension field with a YAML anchor, referenced by the services via image: *anchor. Documents the two traps met in practice on OPS-898 across nine consumer repos: anchors are file-local (every overlay needs its own), and only ${VAR:-def} also catches the empty-but-set variable — a bare omitted tag silently resolves :latest. Verification recipe via docker compose config for both the default and the override path.

Assisted by claude-code:claude-fable-5 — Session

Learned on OPS-898 (nine consumer repos): repeating an image default per
service invites drift; a top-level x-* extension field with a YAML anchor
defines image path, version variable and default tag once per compose
file. Records the two traps met in practice: anchors do not cross files
(overlays need their own), and only ${VAR:-def} catches the empty-but-set
variable that otherwise resolves :latest.

Assisted-by: claude-code:claude-fable-5
Agent-Session: https://claude.ai/code/session_01Mu33BP3JtQfKkpZkeTHLqr
Agent-Host: 0493f0
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sonarqubecloud

Copy link
Copy Markdown

@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant