dive
dive copied to clipboard
[FEATURE REQUEST] Add layer filesystem changes to exported json
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.
YESSSSS to this!
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.
PR https://github.com/wagoodman/dive/pull/458 is for adding this feature to the Dive tool.