compose-spec / compose-spec

The Compose specification

Home Page:https://compose-spec.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to explain Compose file spec definitons

ehvs opened this issue · comments

I spent some time researching to find something similar and could not find.
What is the problem you're trying to solve
Make easier to find out which options are available when writing a Composefile.

Describe the solution you'd like
Similar to what exist using kubectl explain: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/
Using https://github.com/compose-spec/compose-spec/blob/master/03-compose-file.md as reference, ideally I would like to be able to run something like podman-compose explain , that would return

$ podman-compose explain
Version (Optional)
Services (Required)
Networks
Volumes
Configs
Secrets

And then, per example if I want to know what parameters exists for Services, it would list all existing ones.

$ podman-compose Services
image
container_name
environment
ports
etc

Additional context
This would provide better experience with CLI, and help on adoption.