Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Would it be possible to add export of changed files to stdout/output file? #99

Open
mgzenitech opened this issue May 8, 2023 · 2 comments

Comments

@mgzenitech
Copy link

mgzenitech commented May 8, 2023

Right now dive has --json switch but it only exports statistics. It would be very beneficial to be able to export each layer file changes to an output file or stdout for automated postprocessing.

For example in my case I need to setup automated validation of Docker images based on if they have some files added with specific extensions or not. If dive would provide ability to export the layers files to stdout or output file then I could postprocess it with either jq or plain grep..

@mgzenitech mgzenitech changed the title Would it be possible to add export of changed files to a file? Would it be possible to add export of changed files to stdout/output file? May 8, 2023
@mgzenitech
Copy link
Author

mgzenitech commented May 8, 2023

Maybe just an additional verbosity switch after --json could be added?

dive localhos/random-image:latest --json parsed_data.json --verbose

And that parsed_data.json would include also lists of all the files modified in each layer?

@stuaxo
Copy link

stuaxo commented Jan 14, 2025

Maybe just an additional verbosity switch after --json could be added?

dive localhos/random-image:latest --json parsed_data.json --verbose

And that parsed_data.json would include also lists of all the files modified in each layer?

Personally I'd have it as the default, though if compatibility with the original fork is desired it could make sense.

Having verbosity levels could be a thing, in stuff like pytest you can do -v -vv etc. (Here there is only one level being proposed for now).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants