mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 06:06:38 +01:00
fix(digest): check container image info for nil (#1027)
This commit is contained in:
parent
7221704638
commit
9bb8991a76
3 changed files with 17 additions and 1 deletions
|
|
@ -22,6 +22,10 @@ const ContentDigestHeader = "Docker-Content-Digest"
|
|||
|
||||
// CompareDigest ...
|
||||
func CompareDigest(container types.Container, registryAuth string) (bool, error) {
|
||||
if !container.HasImageInfo() {
|
||||
return false, errors.New("container image info missing")
|
||||
}
|
||||
|
||||
var digest string
|
||||
|
||||
registryAuth = TransformAuth(registryAuth)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue