mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Merge pull request #11296 from ywk253100/200326_replication
Support replicate images with media type application/vnd.docker.distribution.manifest.v1+json
This commit is contained in:
commit
1bbd3585e5
@ -53,6 +53,7 @@ var (
|
||||
v1.MediaTypeImageManifest,
|
||||
schema2.MediaTypeManifest,
|
||||
schema1.MediaTypeSignedManifest,
|
||||
schema1.MediaTypeManifest,
|
||||
}
|
||||
)
|
||||
|
||||
@ -473,7 +474,7 @@ func (c *client) Copy(srcRepo, srcRef, dstRepo, dstRef string, override bool) er
|
||||
// manifest or index
|
||||
case v1.MediaTypeImageIndex, manifestlist.MediaTypeManifestList,
|
||||
v1.MediaTypeImageManifest, schema2.MediaTypeManifest,
|
||||
schema1.MediaTypeSignedManifest:
|
||||
schema1.MediaTypeSignedManifest, schema1.MediaTypeManifest:
|
||||
if err = c.Copy(srcRepo, digest, dstRepo, digest, false); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ func (t *transfer) copyContent(content distribution.Descriptor, srcRepo, dstRepo
|
||||
// the contents it contains are a few manifests/indexes
|
||||
case v1.MediaTypeImageIndex, manifestlist.MediaTypeManifestList,
|
||||
v1.MediaTypeImageManifest, schema2.MediaTypeManifest,
|
||||
schema1.MediaTypeSignedManifest:
|
||||
schema1.MediaTypeSignedManifest, schema1.MediaTypeManifest:
|
||||
// as using digest as the reference, so set the override to true directly
|
||||
return t.copyArtifact(srcRepo, digest, dstRepo, digest, true)
|
||||
// handle foreign layer
|
||||
|
Loading…
Reference in New Issue
Block a user