mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 16:25:19 +00:00
update vendor
This commit is contained in:
18
vendor/github.com/google/go-containerregistry/pkg/crane/copy.go
generated
vendored
18
vendor/github.com/google/go-containerregistry/pkg/crane/copy.go
generated
vendored
@@ -17,8 +17,7 @@ package crane
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-containerregistry/pkg/authn"
|
||||
"github.com/google/go-containerregistry/pkg/internal/legacy"
|
||||
"github.com/google/go-containerregistry/internal/legacy"
|
||||
"github.com/google/go-containerregistry/pkg/logs"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
@@ -59,7 +58,7 @@ func Copy(src, dst string, opt ...Option) error {
|
||||
}
|
||||
case types.DockerManifestSchema1, types.DockerManifestSchema1Signed:
|
||||
// Handle schema 1 images separately.
|
||||
if err := copySchema1(desc, srcRef, dstRef); err != nil {
|
||||
if err := legacy.CopySchema1(desc, srcRef, dstRef, o.remote...); err != nil {
|
||||
return fmt.Errorf("failed to copy schema 1 image: %v", err)
|
||||
}
|
||||
default:
|
||||
@@ -87,16 +86,3 @@ func copyIndex(desc *remote.Descriptor, dstRef name.Reference, o options) error
|
||||
}
|
||||
return remote.WriteIndex(dstRef, idx, o.remote...)
|
||||
}
|
||||
|
||||
func copySchema1(desc *remote.Descriptor, srcRef, dstRef name.Reference) error {
|
||||
srcAuth, err := authn.DefaultKeychain.Resolve(srcRef.Context().Registry)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dstAuth, err := authn.DefaultKeychain.Resolve(dstRef.Context().Registry)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return legacy.CopySchema1(desc, srcRef, dstRef, srcAuth, dstAuth)
|
||||
}
|
||||
|
Reference in New Issue
Block a user