Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add JSON output option for docker trust view #659

Closed
rn opened this issue Oct 31, 2017 · 6 comments
Closed

Add JSON output option for docker trust view #659

rn opened this issue Oct 31, 2017 · 6 comments

Comments

@rn
Copy link

rn commented Oct 31, 2017

docker trust view is great for humans, but for scripting it would be nice to have an option to also generate the information in JSON or some other format, maybe something like docker trust view --json <image>.

@thaJeztah
Copy link
Member

For that, I'd prefer to have docker trust inspect, which historically prints JSON by default

/cc @riyazdf

@thaJeztah
Copy link
Member

Related; proposal/discussion on #522

@riyazdf
Copy link

riyazdf commented Oct 31, 2017

@rn: What would you like to script here? If we translated the exact docker trust view info into JSON, is that sufficient or are there certain parameters you would expect?

We could potentially expose even more information here that we decided to omit from docker trust view cc @endophage

@rn
Copy link
Author

rn commented Oct 31, 2017

@riyazdf My specific use case is that I want to write a script to check LinuxKit packages to make sure that the manifest lists and the constituent parts are all signed properly. I can obviously just grep for some string in the output but thought it might be nicer to have this a bit more structured.

@thaJeztah Yeah, I was a bit surprised to not see inspect and see view which I hadn't seen before. Looking at #522 I think having inspect for low level stuff and view for humans would make sense

@riyazdf
Copy link

riyazdf commented Oct 31, 2017

@rn: got it, yes I agree that docker trust inspect would be perfect for this

@thaJeztah
Copy link
Member

Yeah, I was a bit surprised to not see inspect and see view which I hadn't seen before.

You can find the reason in my comment here; #472 (review)

Basically, the inspect output defaulted to "pretty print". Instead of requiring users to type docker trust inspect --pretty-print to read the output, I suggested using view instead (with the option to later add an inspect function). We made the commands experimental so that we can still change/discuss 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants