Skip to content

docker: add OCI image labels for version and build date#21653

Open
ssam18 wants to merge 2 commits intoggml-org:masterfrom
ssam18:docker/oci-image-labels
Open

docker: add OCI image labels for version and build date#21653
ssam18 wants to merge 2 commits intoggml-org:masterfrom
ssam18:docker/oci-image-labels

Conversation

@ssam18
Copy link
Copy Markdown
Contributor

@ssam18 ssam18 commented Apr 9, 2026

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.created and org.opencontainers.image.version labels to all published Docker images, populated from the build timestamp and the existing version tag generated during CI. Users can now run docker inspect <image> to instantly see what version they're running. Fixes #21645

@ssam18 ssam18 requested review from a team and ngxson as code owners April 9, 2026 02:21
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 9, 2026

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.

Copy link
Copy Markdown
Member

@taronaeo taronaeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good addition to me :)

Comment thread .github/labeler.yml
@candrews
Copy link
Copy Markdown

candrews commented Apr 9, 2026

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).

@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from e3053a7 to 8064797 Compare April 9, 2026 14:13
@github-actions github-actions Bot added the devops improvements to build systems and github actions label Apr 9, 2026
Copy link
Copy Markdown
Member

@CISC CISC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add id: checkout to the checkout step so we can get the right SHA.

Please provide a successful run of the job (disable s390x).

Comment thread .github/workflows/docker.yml Outdated
Comment thread .github/workflows/docker.yml Outdated
Comment thread .github/workflows/docker.yml Outdated
Comment thread .devops/cann.Dockerfile Outdated
@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from 8064797 to b973ae5 Compare April 9, 2026 20:51
EZForever added a commit to EZForever/llama.cpp-static that referenced this pull request Apr 21, 2026
@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 21, 2026

can we merge this PR?

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 21, 2026

can we merge this PR?

Where's the successful run?

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 22, 2026

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.

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 22, 2026

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 22, 2026

@CISC
Copy link
Copy Markdown
Member

CISC commented Apr 23, 2026

The labels don't seem to be applied: https://github.com/ssam18/llama.cpp/pkgs/container/llama.cpp/812998280?tag=server-vulkan-ci-oci-labels-test-run-b8739-71dfdce

please check now.

You forgot to disable s390x.

@ssam18
Copy link
Copy Markdown
Contributor Author

ssam18 commented Apr 23, 2026

The labels don't seem to be applied: https://github.com/ssam18/llama.cpp/pkgs/container/llama.cpp/812998280?tag=server-vulkan-ci-oci-labels-test-run-b8739-71dfdce

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.

@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from efc0228 to 49c762f Compare April 23, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: It would be great if the docker image contained a label with the version number

4 participants