mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
make sure all different ref formats are supported
This commit is contained in:
parent
ff8cb884a0
commit
eb8580f7f2
4 changed files with 55 additions and 7 deletions
|
|
@ -2,6 +2,7 @@ package manifest
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/containrrr/watchtower/pkg/registry/auth"
|
||||
"github.com/containrrr/watchtower/pkg/registry/helpers"
|
||||
"github.com/containrrr/watchtower/pkg/types"
|
||||
ref "github.com/docker/distribution/reference"
|
||||
|
|
@ -31,7 +32,8 @@ func BuildManifestURL(container types.Container) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
img = strings.TrimPrefix(img, fmt.Sprintf("%s/", host))
|
||||
img = auth.GetScopeFromImageName(img, host)
|
||||
|
||||
if !strings.Contains(img, "/") {
|
||||
img = "library/" + img
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue