mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
print to log if multiple watchtower instances are detected
This commit is contained in:
parent
6157c50e4f
commit
7db0aed2a5
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ package actions
|
||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/containrrr/watchtower/container"
|
"github.com/containrrr/watchtower/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -17,6 +19,7 @@ func CheckPrereqs(client container.Client, cleanup bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(containers) > 1 {
|
if len(containers) > 1 {
|
||||||
|
log.Info("Found multiple running watchtower instances. Cleaning up")
|
||||||
sort.Sort(container.ByCreated(containers))
|
sort.Sort(container.ByCreated(containers))
|
||||||
|
|
||||||
// Iterate over all containers execept the last one
|
// Iterate over all containers execept the last one
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue