dive icon indicating copy to clipboard operation
dive copied to clipboard

[FEATURE REQUEST] Add layer filesystem changes to exported json

Open RaananHadar opened this issue 4 years ago • 3 comments

One of the best features of dive is showing which files changed between the layers in the tree view. However this data is currently not exported to json when using the -j flag. To the best of my knowledge, dive is the only tool able to achieve this today.

Inspired by this post, I really wish for tools that will attempt to recreate docker files from the docker image. This is very important for inspecting docker images for on prem environments in terms of security. To achieve this, a user would copy the files of interest outside of the container as a first step: so the exact files need to be identified. This can be achieved today with dive, but only via the tree view. This is manual and inefficient for complex images and has a huge potential for automation and scaling this process to multiple images.

In short, it would be really useful if for each layer in the json, the paths of the modified files, added files and removed files can be exported as well.

RaananHadar avatar Jan 08 '21 21:01 RaananHadar

YESSSSS to this!

rulatir avatar Jan 25 '21 06:01 rulatir

I would love to see this as well. I'm not sure what other tools might be consuming this right now, but I'd anticipate the sudden addition of the layer filesystem changes could be quite large, depending on the size of the image. I'd be open to the idea of yet another flag to include these extra pieces as well.

My use case is looking at providing a browser-based UI and help folks see how to better their images.

mikesir87 avatar Mar 03 '21 17:03 mikesir87

PR https://github.com/wagoodman/dive/pull/458 is for adding this feature to the Dive tool.

Akash-Nayak avatar Jul 07 '23 18:07 Akash-Nayak