docker: add OCI image labels for version and build date#21653
docker: add OCI image labels for version and build date#21653ssam18 wants to merge 2 commits intoggml-org:masterfrom
Conversation
|
heads up! The labeler failure is not from this PR, it is a broken config in labeler.yml that's been failing on every PR. fix is included here, just needs a merge. |
taronaeo
left a comment
There was a problem hiding this comment.
Seems like a good addition to me :)
|
Can you also some other image labels?
These labels are documented at https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys They're useful for both people to use manually and for automated systems to use (for example, Renovate uses this information to create better PR descriptions). |
e3053a7 to
8064797
Compare
CISC
left a comment
There was a problem hiding this comment.
Add id: checkout to the checkout step so we can get the right SHA.
Please provide a successful run of the job (disable s390x).
8064797 to
b973ae5
Compare
|
can we merge this PR? |
Where's the successful run? |
|
Successful run here: https://github.com/ssam18/llama.cpp/actions/runs/24752990085 Triggered from a throwaway branch off this PR with the s390x matrix entry removed (since the s390x runner isn't available on the fork). The PR branch itself is unchanged. |
|
The labels don't seem to be applied: |
please check now. |
You forgot to disable s390x. |
Thanks for calling that out. The earlier test image only had the Dockerfile LABEL changes, and GHCR does not show those on the package page because they live in the image config. The follow-up commit is the one that propagates the OCI metadata to the manifest and multi-arch index, which is what GHCR actually displays. Also, s390x was removed only on the temporary test branch to work around fork runner limits; the PR branch intentionally keeps it unchanged. |
efc0228 to
49c762f
Compare
Running a container and not knowing which version you're on is a frustrating experience, especially when trying to decide whether to pull a newer image. This adds
org.opencontainers.image.createdandorg.opencontainers.image.versionlabels to all published Docker images, populated from the build timestamp and the existing version tag generated during CI. Users can now rundocker inspect <image>to instantly see what version they're running. Fixes #21645