-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Description
Description
The docker compose run command has the ability to add a label to the service. It would be nice to have that same ability when launching the entire stack.
For example:
- I run
docker compose up --label some-key=some-value(the flag can be used multiple times) - All default services are started
- While inspecting the containers, I see that the label
some-key=some-valueare on all services, networks, and volumes created by the Compose stack.
Why this is useful
While a Compose stack adds labels for the project name, it would be nice to be able to add arbitrary metadata for those stacks, especially for tooling that might managing multiple stacks (as we are now doing with Labspaces). With this metadata, we can better annotate the stacks to know which stack is which, etc.