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

No convenient way for accessing image labels for all manifest formats #57

Open
1 of 2 tasks
steveej opened this issue Nov 7, 2018 · 2 comments
Open
1 of 2 tasks

Comments

@steveej
Copy link
Contributor

steveej commented Nov 7, 2018

Image labels can be created within the Dockerfile with the LABEL instruction.

Although not officially documented, we could get these via the already implemented manifests:

  • V2 S1 they are stored in the first element of the history array, and
  • V2 S2 they are stored in the config array.

On quay.io there's an API endpoint for getting labels, which requires a manifestref that must be fetched via the listRepoTags endpoint first.


Implementation state

@wking
Copy link

wking commented Nov 7, 2018

Although not officially documented...

For forward-looking images, it's probably best to look at the OCI docs. For labels/annotations, the relevant spec sections are here, here, here, and here (although the spec doesn't have much to say about how to assemble annotations from those sources (see this comment).

@steveej
Copy link
Contributor Author

steveej commented Nov 7, 2018

Thanks for those pointers. I got the above information from a the Quay team directly, which is currently the source of truth. Of course this might change in the future but for now this is what we're working with.

Since Quay currently emits V2 S1 manifests I started implementing the V2 S1 label parser. It's pretty straight forward as the v1compat struct history array is already part of what we have. See how the Label is stuff into that from this fixture example.

@steveej steveej changed the title No convenient way for accessing image labels No convenient way for accessing image labels for all manifest formats Nov 15, 2018
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

2 participants