Skip to content

USE GIT_COMMIT in container builds#255

Open
cdesiniotis wants to merge 1 commit intomainfrom
add-commit-label-to-image
Open

USE GIT_COMMIT in container builds#255
cdesiniotis wants to merge 1 commit intomainfrom
add-commit-label-to-image

Conversation

@cdesiniotis
Copy link
Copy Markdown
Contributor

@cdesiniotis cdesiniotis commented Mar 9, 2025

$ regctl image inspect ghcr.io/nvidia/driver:eac3fe8c-570.124.06-ubuntu22.04 --format '{{ jsonPretty .Config.Labels }}'
{
  "com.nvidia.git-commit": "eac3fe8c7c066ebffb41a5592eedfc1dd36d7891",
  "description": "See summary",
  "io.k8s.display-name": "NVIDIA Driver Container",
  "maintainer": "NVIDIA CORPORATION <cudatools@nvidia.com>",
  "name": "NVIDIA Driver Container",
  "org.opencontainers.image.ref.name": "ubuntu",
  "org.opencontainers.image.version": "22.04",
  "release": "N/A",
  "summary": "Provision the NVIDIA driver through containers",
  "vendor": "NVIDIA",
  "version": "570.124.06"
}

Copy link
Copy Markdown
Contributor

@shivakunv shivakunv left a comment

Choose a reason for hiding this comment

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

LGTM

LABEL name="NVIDIA Driver Container"
LABEL vendor="NVIDIA"
LABEL version="${DRIVER_VERSION}"
LABEL com.nvidia.git-commit="${GIT_COMMIT}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd classify git-commit under generic metadata similar to name, vendor, version. let's drop the com.nvidia prefix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have updated this to vcs-ref

@cdesiniotis cdesiniotis marked this pull request as draft March 26, 2025 22:20
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
@cdesiniotis cdesiniotis force-pushed the add-commit-label-to-image branch from 6feead4 to c8dd0cc Compare March 30, 2026 21:47
@cdesiniotis cdesiniotis marked this pull request as ready for review March 30, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants