modify code

This commit is contained in:
Simon Rieger 2025-07-21 11:33:41 +02:00
parent 7530cc18eb
commit 5484fa1055

View file

@ -110,6 +110,9 @@ func checkImageUpdates() {
}
}
}
for tag, digest := range imageTagToDigest {
fmt.Printf("imageTagToDigest: %s -> %s\n", tag, digest)
}
results := make([]ImageStatus, 0)
for _, ctr := range containers {
@ -146,11 +149,16 @@ func checkImageUpdates() {
remoteDigest := desc.GetDigest().String()
update := 0.0
fmt.Printf("Container: %s\n", containerName)
fmt.Printf(" Image: %s\n", rawTag)
fmt.Printf(" Local Digest: %s\n", localDigest)
fmt.Printf(" Remote Digest: %s\n", remoteDigest)
if localDigest != remoteDigest {
update = 1.0
fmt.Printf("⚠️ Container: %s\n -> Image: %s\n -> Update verfügbar!\n", containerName, rawTag)
fmt.Println(" -> ⚠️ Update verfügbar!")
} else {
fmt.Printf("✅ Container: %s\n -> Image: %s\n -> Aktuell\n", containerName, rawTag)
fmt.Println(" -> ✅ Kein Update erforderlich.")
}
imageName, imageTag := rawTag, "latest"