-
Notifications
You must be signed in to change notification settings - Fork 9
properties are upside down 🕺in docker-compose.yml #129
Comments
Actually, Yaml does not enforce parameters order, therefore this configuration is totally valid. That's a shame 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 |
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, 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 🔙
The text was updated successfully, but these errors were encountered: