Hey everyone! I'm on the hunt for a standardized method to extract all the different parameters that can be configured when using a Docker image. Documentation is definitely a starting point, but isn't there a more uniform way to get a comprehensive list that includes argument types, descriptions, and how to set them? For example, I'd love something like this: |Type|Name|Description| |:-|:-|:-| |Environment variable|RUNTIME_ENV|Controls certain behaviors| |Argument|SMTP_SERVER|Specifies the SMTP server to use...| I know that different images have their unique ways of handling configurations, like environment variables versus command-line arguments. It would be fantastic to have a way to pull metadata that lists all configurable options if the maintainer has provided them. If something like this already exists, could someone point me to the relevant documentation? Thanks!
4 Answers
For solid documentation, try looking at examples like those on GitHub, such as the [docker-postgres project](https://github.com/11notes/docker-postgres). A good documentation will lay everything out clearly and provide examples, which is super helpful for building your own setups.
To get started, you can use the `docker inspect` command. It'll let you explore fields that interest you in the output. It can look into the image itself, and then you can run the container and inspect that too for more details.
I've done this using Python or Ansible tasks, and it works as I mentioned. You can parse image metadata and extract detailed info, just like in my previous downvoted post!
There's actually a funny xkcd comic that relates to this situation... It captures the frustration perfectly!
Honestly, the standardized way to get this info is just to read the project documentation. It's like asking for a user manual for every Docker container, but that really depends on the project's scope. If the docs aren't up to par, no extra source will really help that.

Exactly! That's what I recommend as well. While it might not be a guaranteed standard for every image, most do provide environment variables through `docker inspect` in the Docker CLI.