modify code
This commit is contained in:
parent
7530cc18eb
commit
5484fa1055
1 changed files with 10 additions and 2 deletions
12
go/main.go
12
go/main.go
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue