feat: add imageVersion to ImageInfo and related types for enhanced image tracking#4
Open
RF1705 wants to merge 1 commit into
Open
feat: add imageVersion to ImageInfo and related types for enhanced image tracking#4RF1705 wants to merge 1 commit into
RF1705 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dockge now reads that value during the existing local image inspection and includes it in the service data as:
Why
Many container images, including Home Assistant, publish the application version as an OCI image label rather than only through the image tag.
For example, an image may be configured as:
but the actual installed app version is available as:
Exposing this through the API allows integrations and dashboards to show the real application version while keeping the image tag as a fallback.
Changes
Config.Labels["org.opencontainers.image.version"]fromdocker inspectoutput.ImageInfoasimageVersion.imageVersionin each stack service entry.ServiceDatatype with:API behavior
Before:
{ "name": "homeassistant", "image": "ghcr.io/home-assistant/home-assistant:stable", "imageUpdateAvailable": false, "remoteImageDigest": "..." }After:
{ "name": "homeassistant", "image": "ghcr.io/home-assistant/home-assistant:stable", "imageUpdateAvailable": false, "remoteImageDigest": "...", "imageVersion": "2026.5.4" }If the label is not present,
imageVersionisnull.Compatibility
This is backward-compatible. Existing API consumers can ignore the new field, and images without the OCI version label continue to behave exactly as before.
Testing
I could not run the TypeScript check in this environment because
npmwas not available in the shell path.The change is limited to the existing image inspection path and the shared service data type.