Skip to content

Allow for label values that match multiple selectors #621

@m90

Description

@m90

Discussed in #620

Originally posted by huyz August 15, 2025
If I have a list of labels like docker-volume-backup.stop-during-backup=label1 and docker-volume-backup.stop-during-backup=label2, would either label cause the container to stop. I'm not sure how valid it is to have labels with the same key


How it could be done:

  • come up with a good new label name whose value is being split on commas automatically
  • keep the old behavior for the old label name, but print a deprecation warning on usage
  • remove all mentions of the old label from the docs
  • on the next major version, remove the old label entirely

or:

  • introduce a LABEL_MATCH_BEHAVIOR which defaults to MATCH which is what is happening right now
  • when this is set to ONE_OF, start splitting values on commas

I'm only 98% sure this can be done right now, as filtering by labels is rather restricted in Docker and adding this feature might mean we'd have to reimplement matching from scratch ourselves.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions