Open Diwoka opened 6 years ago
Actually, Yaml does not enforce parameters order, therefore this configuration is totally valid. That's a shame docker-compose
does not use xml configuration, at least configuration would be consistent!
Should you add an xml configuration and an xml to yaml transpiler to enable consistent configurations?
Right @tdutrion, Yaml doesn't enforce parameters order but it's basically a de facto standard now, or at least it helps with reading quickly when written in the opposite order
@docker what do you think to get more format to handle services ?
@tdutrion xml looks so heavy but why not use json.
Perhaps, we could create a @tdutrion’s special mode to export in XML or an easter egg for him?
What do you think about @docker and others?
JSON doesn't guarantee parameters order either unless you use jsonx from IBM. You could provide a JSON schema though, which would be more than nothing even though not a proper language construction...
@tdutrion XML format why not, with an XSD schema to validate the structure. @docker
@tdutrion, seems you have one another person to develop that new docker possibility and make a PR to the moby project :-). @skrzypczyk
Guys, this yaml format is an inheritance from fig (http://www.fig.sh/) when Docker bought Orchard back in 2013 or 2014, I am not sure the year.
Back in those days there was a couple tools like azk (http://www.azk.io/) and crane (https://github.com/michaelsauter/crane) that had similar purposes. For azk we need to write a azk file in js format. For crane in other hand we could use json or yaml.
Yaml format become quite standard in this automated world for a bunch of reasons. I use to make a joke with some friends that devops is basic yaml through ssh.
My 2 cents, yaml and json are much more easy to read, to write and to understand, and the payload is way lighter comparing to xml.
If you want to check if yaml or json is valid (at least the syntax) I recommend using lint tools.
Backing to the issue, the order of the nodes in the same level does not matter. =)
Is your feature request related to a problem? Please describe. It's not really a problem as everything's working fine. But all the properties for the services are upside down 🕺
Describe the solution you'd like You can generate them in the reverse order 🔙