Merge branch 'containrrr:main' into add-log-file-support

This commit is contained in:
Johannes Kresner 2024-01-08 16:49:04 +01:00 committed by GitHub
commit 9c8dfec947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 251 additions and 543 deletions

View file

@ -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

View file

@ -2,8 +2,8 @@ package util
import (
"bytes"
"crypto/rand"
"fmt"
"math/rand"
)
// GenerateRandomSHA256 generates a random 64 character SHA 256 hash string