fix(containers): fall back to image tag when version metadata is empty

This commit is contained in:
2026-08-03 14:22:52 +01:00
parent bbc5db473a
commit 3f9fe07c7b
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -47,6 +47,10 @@ func InstallContainer(ctx context.Context, item types.RegistryContainer) error {
}
// 2.5. Persist install metadata so installed-but-not-running state can be tracked without Docker lookups
// The version is required for update detection; fall back to the image tag when the payload omitted it.
if item.Version == "" {
item.Version = imageTag(item.Image)
}
metadata := types.InstalledMetadata{
RegistryContainer: item,
InstalledAt: time.Now().UTC().Format(time.RFC3339),