mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-17 23:50:13 +01:00
Added container labels to ContainerReport interface
This commit is contained in:
parent
36391b0ae7
commit
ee49fb953e
7 changed files with 816 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ func Update(client container.Client, params types.UpdateParams) (types.Report, e
|
|||
|
||||
staleCheckFailed := 0
|
||||
|
||||
for i, targetContainer := range containers {
|
||||
for _, targetContainer := range containers {
|
||||
stale, newestImage, err := client.IsContainerStale(targetContainer)
|
||||
shouldUpdate := stale && !params.NoRestart && !params.MonitorOnly && !targetContainer.IsMonitorOnly()
|
||||
if err == nil && shouldUpdate {
|
||||
|
|
@ -57,7 +57,7 @@ func Update(client container.Client, params types.UpdateParams) (types.Report, e
|
|||
} else {
|
||||
progress.AddScanned(targetContainer, newestImage)
|
||||
}
|
||||
containers[i].SetStale(stale)
|
||||
targetContainer.SetStale(stale)
|
||||
|
||||
if stale {
|
||||
staleCount++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue