You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the problem you're trying to solve
Compose specification is platform-neutral, and express a generic application model. But if we don't want this to just be an academic model, but a pragmatic one people can actually use for real-world application, we need to offer a way for vendors to support custom attributes. Compose specification do allready have such a support with x-* extension fields on top-level elements.
Describe the solution you'd like
A generalization of the extension field support
Recommendation to use vendor prefixes and document known ones
Doing so one could use a compose file like this one :
Unrecognized x- attributes should be ignored, which means the same compose file can both run locally, on AWS and Azure. If this proprietary extension is widely adopted and supported by many vendors, it would make it easier to debate about inclusion in a future version of the specification.
Use of vendor prefixes also limit the risk for conflicting extensions with distinct meaning by vendors.
Additional context
Add any other context about the feature request here.
Even though, this number of the x-* fields could grow rapidly, i was hoping an extension filed to include all of this. If we allow x-* fields everywhere, i'm afrid it will destroy the origin structure of a docker-compose file.
Defining an extension section would isolate custom fiels from the elements they apply to. Please also note x-* already exist in opensource docker-compose file format (for top-level fields), and are used by docker CLI.
I also expect the number of x-* fields to grow, and that this could trigger discussions on extending the spec to support more use-case if some ome them are supported on a significant number of implementations. Consider those a way to introduce "experimental" features by vendors, just like browsers do with CSS.
Activity
hangyan commentedon Jan 19, 2020
Can the
x-field support other data types?ndeloof commentedon Jan 19, 2020
x-*fields can be any type, the spec nor the schema do define any constraint on it.So can be either just a simple type, or a full nested structure.
hangyan commentedon Jan 21, 2020
Even though, this number of the
x-*fields could grow rapidly, i was hoping anextensionfiled to include all of this. If we allowx-*fields everywhere, i'm afrid it will destroy the origin structure of a docker-compose file.ndeloof commentedon Jan 21, 2020
Defining an
extensionsection would isolate custom fiels from the elements they apply to. Please also notex-*already exist in opensource docker-compose file format (for top-level fields), and are used by docker CLI.I also expect the number of x-* fields to grow, and that this could trigger discussions on extending the spec to support more use-case if some ome them are supported on a significant number of implementations. Consider those a way to introduce "experimental" features by vendors, just like browsers do with CSS.
hangyan commentedon Jan 21, 2020
Ok. This seems a better choice.
ndeloof commentedon Feb 11, 2020
see docker/compose#7200 for discussion before spec is made public