feat(up): stamp com.docker.compose project/service labels on containers#110
Open
DonsWayo wants to merge 1 commit into
Open
feat(up): stamp com.docker.compose project/service labels on containers#110DonsWayo wants to merge 1 commit into
DonsWayo wants to merge 1 commit into
Conversation
Containers created by `up` carry no labels, so tools that want to group a stack must guess from the `<project>-<service>` name prefix — which mis-groups unrelated containers that merely share a prefix. Stamp the de-facto-standard Docker Compose labels at creation: com.docker.compose.project=<project> com.docker.compose.service=<service> so any tool can group reliably via `container inspect`. No behavior change otherwise; down/ps continue to work by name. Verified on macOS 26 + container 1.0.0: after `up`, `container inspect <project>-<service>` shows both labels; `down` tears the stack down unchanged.
This was referenced Jun 17, 2026
DonsWayo
added a commit
to DonsWayo/consai
that referenced
this pull request
Jun 17, 2026
) Adds label-based grouping as step 0 of assembly (always on, no guessing): containers carrying com.docker.compose.project group into a .composeLabeled stack regardless of the name-prefix setting. This is reliable (no false 'qa' stack, #12) and groups externally- launched stacks once the compose tool labels them (upstream Mcrich23/Container-Compose#110). - StackOrigin.composeLabeled (trusted; no 'wild' badge; link a compose file to enable up/down) - ProjectRegistry.composeProjectLabel constant + label grouping before known/inferred - StackSection offers 'Link compose file' for any unlinked stack - Test: label grouping works with inference off; unlabeled containers stay standalone - Verified live: a patched-container-compose 'shop' stack groups with no 'wild' badge Closes #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
container-compose upnames containers<project>-<service>but writes no labels(
container inspect→labels: {}). External tools (GUIs, dashboards, scripts) that want togroup a stack's containers are forced to guess from the name prefix, which mis-groups
unrelated containers that merely share a prefix (e.g.
qa-web+qa-cache).This stamps the de-facto-standard Docker Compose labels on each container at creation:
com.docker.compose.project=<project>com.docker.compose.service=<service>so any tool can group a stack reliably via labels. No behavior change otherwise —
down/pscontinue to work by name.Diff
One file, +6 in
ComposeUp.swift, right after--nameis appended:Verified (macOS 26, container 1.0.0)
Built from source and run against a real daemon;
swift buildclean.Notes
projectName.com.docker.compose.*for broad tool interoperability. Happy to switchto a project-specific namespace if you'd prefer.