dive icon indicating copy to clipboard operation
dive copied to clipboard

Add Json output to export technical details

Open Trubador opened this issue 1 year ago • 10 comments

What would you like to be added:

I would like to get Dive to output a Json file containing all the analyzed data from the Docker Image:

  • Layers & Layer contents & Layer details
  • Image details
  • Metadata
  • Metrics such as wasted space
  • Stats
  • Etc.

Why is this needed:

I would like to generate an automatic diagram based on the data from the Json file such that I can easily view the structure of a deployed container image.

Additional context:

Trubador avatar Feb 16 '24 20:02 Trubador

So, something like dive <image> --json output_file.json?

mark2185 avatar Feb 16 '24 20:02 mark2185

Yes, that would be perfect! 😃 Especially if the Json structure is also documented such that I can easily understand it.

Trubador avatar Feb 16 '24 20:02 Trubador

Try it out, it's already there!

mark2185 avatar Feb 16 '24 21:02 mark2185

Oh sorry about that, I can see that. I just tried it now, though It only output a subset of the data Dive displays in terminal GUI. I need all the data from that in the Json file as well so I have a complete detailed representation of all relations and files inside image layers

Trubador avatar Feb 16 '24 21:02 Trubador

I too would also like to, for example, a list of all files added in a given layer as you can see in the UI viewed but represented in JSON output via a non-interactive command. This does not appear to be possible at the moment.

zaventh avatar Jun 19 '24 20:06 zaventh