mirror of
https://github.com/containrrr/watchtower.git
synced 2026-01-21 08:16:10 +01:00
Merge branch 'containrrr:main' into add-log-file-support
This commit is contained in:
commit
9c8dfec947
22 changed files with 251 additions and 543 deletions
|
|
@ -39,7 +39,11 @@ func CheckForSanity(client container.Client, filter types.Filter, rollingRestart
|
|||
// will stop and remove all but the most recently started container. This behaviour can be bypassed
|
||||
// if a scope UID is defined.
|
||||
func CheckForMultipleWatchtowerInstances(client container.Client, cleanup bool, scope string) error {
|
||||
containers, err := client.ListContainers(filters.FilterByScope(scope, filters.WatchtowerContainersFilter))
|
||||
filter := filters.WatchtowerContainersFilter
|
||||
if scope != "" {
|
||||
filter = filters.FilterByScope(scope, filter)
|
||||
}
|
||||
containers, err := client.ListContainers(filter)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package util
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
// GenerateRandomSHA256 generates a random 64 character SHA 256 hash string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue