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

May we add open containers labels to the Dockerfile? #106

Open
mstoetzer opened this issue May 23, 2022 · 4 comments
Open

May we add open containers labels to the Dockerfile? #106

mstoetzer opened this issue May 23, 2022 · 4 comments

Comments

@mstoetzer
Copy link

mstoetzer commented May 23, 2022

It could be a nice addition to provide official opencontainers labels in the Dockerfile:

LABEL org.opencontainers.image.authors="xxxx" \
      org.opencontainers.image.source="https://github.com/ori-edge/k8s_gateway" \
      org.opencontainers.image.description="A CoreDNS plugin that is very similar to [k8s_external](https://coredns.io/plugins/k8s_external/) but supporting all types of Kubernetes external resources" \
      org.opencontainers.image.documentation="https://github.com/ori-edge/k8s_gateway" \
      org.opencontainers.image.licenses="Apache License 2.0" \
      org.opencontainers.image.title="k8s_gateway" \
      org.opencontainers.image.url="https://github.com/ori-edge/k8s_gateway" \
      org.opencontainers.image.vendor="Ori Industries 1 Ltd"

This is useful for various automation tools (e.g. dependabot or renovatebot) that are able to extract the release notes from github and other information. When these tools update the dockerimage version, they can extract the release notes from the source label and provide it in the pullrequest. See the renovate docs

What do you think? What values should those labels have?

@mstoetzer
Copy link
Author

@networkop
Copy link
Collaborator

it sounds pretty cool. Do you have any good examples where we can borrow this for GH actions?

@networkop
Copy link
Collaborator

This looks like a good pointer https://github.com/humio/humio-operator/pull/449/files

@mstoetzer
Copy link
Author

mstoetzer commented May 24, 2022

Haven't used them in GH actions before. I put them directly into the Dockerfile. But yes, putting them as build args could also work to avoid bloating the Dockerfile. I'm fine with both.

Well, there is a plugin for GH actions: https://github.com/marketplace/actions/docker-metadata-action

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

No branches or pull requests

2 participants