Docker.github.io: Provide parent for each key in the compose file

Created on 24 Jan 2017  路  4Comments  路  Source: docker/docker.github.io

File: compose/compose-file.md

Into docker compose file reference, I would like to know the parent of each docker-compose property.
E.g.:

  • 'build' property has 'serviceName' parent.
  • 'services' has not parent (i.e. it's a root property)
areCompose

All 4 comments

I'm not sure how we feel about doing this. We do provide a lot of YAML examples in this file to show the structure of different parts of the file.

@shin- do you have any thoughts on this?

@mstanleyjones One thing I've noticed is that if I give you a link to a section of the reference, like https://docs.docker.com/compose/compose-file/compose-file-v2/#volumes-volume_driver - it's actually hard to tell that this actually the documentation of the volumes key for a service. That's compounded by the fact that volumes is also a valid top-level key, but with a different syntax.

OTOH, a link to networks actually has fully-developed examples (up to the top-level services key) which helps a lot with disambiguation. One solution might be to extend that treatment to other examples. volumes is definitely the most problematic in my mind because of said ambiguity. Other sections seem fine to me, but I'm also used to it.

I'm not sure what the right way to organize the file might be. I've assigned it to @londoncalling for now and maybe she and you can discuss it and come up with something.

Was this page helpful?
0 / 5 - 0 ratings