Skip to content

Conversation

@Pnkcaht
Copy link

@Pnkcaht Pnkcaht commented Jan 15, 2026

What I did

Added support for the --label flag to docker compose up, allowing users to add or override labels on all services when starting a Compose stack.

This brings compose up in line with existing behavior from other commands (such as compose run and compose create), making it possible to attach arbitrary metadata to a full Compose stack at runtime.

The provided labels are applied before container creation, ensuring they are correctly propagated to all created containers.

Related issue

Fixes #13436

(not mandatory) A picture of a cute animal, if possible in relation to what you did

🐜 An ant carefully tagging everything in its path — just like Compose now labels all services when bringing a stack up.

Notes

  • Adds --label flag support to docker compose up
  • Allows labeling all services in a stack at startup
  • Reuses existing label parsing and application logic
  • No behavior change when the flag is not used
  • Fully backward compatible

Screenshot (Test)

Image

@Pnkcaht Pnkcaht requested a review from a team as a code owner January 15, 2026 00:55
@Pnkcaht Pnkcaht requested review from glours and ndeloof January 15, 2026 00:55
@ndeloof
Copy link
Contributor

ndeloof commented Jan 15, 2026

👎 I'm not favorable to this feature request.

labels in the compose file can be declared with value interpolated. Doing so the compose.yaml has a full definition of services, with all expected labels, just the value is dynamic and can be tweaked by user at runtime.

@Pnkcaht
Copy link
Author

Pnkcaht commented Jan 15, 2026

👎 I'm not favorable to this feature request.

labels in the compose file can be declared with value interpolated. Doing so the compose.yaml has a full definition of services, with all expected labels, just the value is dynamic and can be tweaked by user at runtime.

Thank you for your feedback @ndeloof .
I can adjust or discard this if you feel it's not the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add label to all services when starting Compose stack

2 participants