[Feature] Add OCI Image Annotations to container images#37678
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces standard OCI image annotations to all vLLM Dockerfiles, which is a great improvement for image metadata and tooling integration. The changes are consistent across the different Dockerfiles. However, I've identified a high-severity issue where the labels defined in docker/docker-bake.hcl will override the new annotations in docker/Dockerfile during bake builds, leading to inconsistent metadata. My review includes a comment to address this discrepancy.
| LABEL org.opencontainers.image.title="vLLM" \ | ||
| org.opencontainers.image.description="A high-throughput and memory-efficient inference and serving engine for LLMs" \ | ||
| org.opencontainers.image.url="https://vllm.ai" \ | ||
| org.opencontainers.image.source="https://github.com/vllm-project/vllm" \ | ||
| org.opencontainers.image.vendor="vLLM Project" \ | ||
| org.opencontainers.image.licenses="Apache-2.0" |
There was a problem hiding this comment.
While these labels are a great addition for standard docker build commands, they will be overridden by the labels defined in docker/docker-bake.hcl when using docker buildx bake. The labels in docker-bake.hcl are currently inconsistent with the changes in this PR.
Specifically, in docker/docker-bake.hcl:
org.opencontainers.image.urlis missing.org.opencontainers.image.vendoris set to"vLLM"instead of"vLLM Project".org.opencontainers.image.descriptionhas avLLM:prefix that is not present here.
To ensure consistency across all build methods, please update the _labels target in docker/docker-bake.hcl to match these new annotations. This will ensure that bake builds have the same rich metadata.
|
This pull request has merge conflicts that must be resolved before it can be |
|
This pull request has merge conflicts that must be resolved before it can be |
Summary
This PR adds standard OCI Image Annotations to all vLLM Dockerfiles, improving container image metadata for registries and tooling.
Changes
Added OCI-compliant
LABELinstructions to the following Dockerfiles:org.opencontainers.image.*annotationsAnnotations Added
Each image now includes:
org.opencontainers.image.titleorg.opencontainers.image.descriptionorg.opencontainers.image.urlorg.opencontainers.image.sourceorg.opencontainers.image.vendororg.opencontainers.image.licensesBenefits
Example
After building, the image metadata will show:
Related
Fixes: #32674