wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
44.53k stars 1.69k forks source link

Export dive information #487

Open cduverne opened 7 months ago

cduverne commented 7 months ago

What would you like to be added: When using dive from a terminal, it would be great to be able to export the result in a file for extra processing. Exporting to flat files, or even structures ones (like CSV) would be great.

Why is this needed: So we can build extra processing features on top of several Dive exports.

mark2185 commented 7 months ago

You can pass it the --json <output-file> flag to write the output as JSON. Would that suffice your needs?

cduverne commented 7 months ago

Ha that's nice ! It's not in the "-h" doc, right ? Could be good to add it there. Will try the JSON output, CSV would also be nice to go for "non-nested" structures.

mark2185 commented 7 months ago

I found it by running dive --help, so it is there :)

Will try the JSON output, CSV would also be nice to go for "non-nested" structures.

It would, but until that's implemented I suggest jq to create the format you want/need..