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

Automated README Set based on Image Annotations or Labels #9

Open
Vad1mo opened this issue Sep 2, 2020 · 2 comments
Open

Automated README Set based on Image Annotations or Labels #9

Vad1mo opened this issue Sep 2, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Vad1mo
Copy link

Vad1mo commented Sep 2, 2020

Automated README Set from repo Annotations/Labels

docker-pushrm could read Annotations or Labels from images and use the provided URLs in the annotation or label to fetch the README content.

One of the tricky parts would be that fact that most README files in the corp env are not public, so simply calling http get won't do the trick. An easier and more common approch would be to use GIT + SSH key this setup is support basically everywhere.

Annotations or Labels Format Recommendations

https://docs.docker.com/config/labels-custom-metadata/#key-format-recommendations
https://github.com/opencontainers/image-spec/blob/master/annotations.md

Libs to fetch Image Metadata

https://github.com/containers/skopeo
https://github.com/containers/image

Edit:

In addition to that, especially in the first iteration it would be easier to implement only the use case where the Annotations/Labels is pointing to the README within the image itself.

@christian-korneck
Copy link
Owner

christian-korneck commented Sep 3, 2020

hi @Vad1mo , thanks a lot for the suggestion. It's an interesting idea. Would really like to elaborate further. What typical usecase / workflow do you have in mind for this?

The first thing that popped into my mind was that something like this could be useful when migrating container repos between registries (i.e. with skopeo sync <source> <target>). If the container image that you're migrating contains a label reference to the git repo it was built from then the README file could get fetched from there (with git) and get set as repo description on the target container repo.

Do you have something like this in mind or are you after some other usecase?

@christian-korneck christian-korneck added the enhancement New feature or request label Sep 3, 2020
@Vad1mo
Copy link
Author

Vad1mo commented Sep 3, 2020

What I had in mind was to run docker-pushrm as an autonomous background job that could fetch the Readme from git or from within the image itself and update the info in the registry.

The background docker-pushrm would then crawl or would get triggered by a webhook do its job.

So all in all it could run autonomous without the user doing anything in the in CI/CD or himself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants