Dynamically Inventoring Docker

The short version is: How can I dynamically map all containers, their OS with version and their Java & .Net version?

The long version:
I work in a company that has several hundreds of diff applications running on rancher/kubernets/docker. The most of them are completely unrelated.
As a solutions architect one of my responsibilities is to map the obsolescence of each piece of software here, including the ones we develop ourselves.
I would like to create a plugin or some kind of “observer” that would scan our rancher, list all the containers running and produce a list of images used, along with their OS, Java and .Net installed versions.
I know that using the interface, I can click the exec on a pod and run uname -r for complete OS version, and dotnet --info for .Net Core version, and java -version for java…
So, is there a plugin infrastructure who would allow me to inspect my rancher environment? or I would be forced to create a observer that would inspect the rancher instances via an API?