Skip to content

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

Open
ssam18 wants to merge 1 commit intoggml-org:masterfrom
ssam18:docker/oci-image-labels
Open

docker: add OCI image labels for version and build date#21653
ssam18 wants to merge 1 commit 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 :)

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

@ssam18 ssam18 force-pushed the docker/oci-image-labels branch from 8064797 to b973ae5 Compare April 9, 2026 20:51
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