-
Notifications
You must be signed in to change notification settings - Fork 0
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
Define common opencontainer labels automatically #280
Comments
I'm not a fan to set any label automatically. But there is https://github.com/thegeeklab/wp-docker-buildx/blob/main/docker/docker.go#L105 already. You can just use consume it in your containerfile:
|
Ah, thanks! The following works:
|
Do you still think there should at least an option to auto-set the openconainer labels? |
I think so yes, but I understand your reasoning not wanting to set any label by default. One could even argue that the added value of a plugin is to simplify things like that for users but I am also OK with the workaround 🙂️ |
Alright you convinced me. Lets add them but disabled by default by a settings flag? |
That would be great! And yes, if there's a flag and a choice for the user, it should likely be disabled by default. |
In the official buildx plugin some labels are automatically set by the plugin by inferring information from the build context.
One of these,
org.opencontainers.image.created
is also somewhat important as e.g. artifacthub.io requires it for some metadata extraction.For now I can workaround this via
date -u +"%Y-%m-%dT%H:%M:%SZ")
explicitly but it would be great to have support for this within the plugin.The text was updated successfully, but these errors were encountered: