Support replication windows images

Skip the foreign layers when do the replication

Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
Wenkai Yin 2019-04-12 15:27:48 +08:00
parent 2fe207b77d
commit 04883d2b0d

View File

@ -225,6 +225,10 @@ func (t *transfer) copyBlobs(blobs []distribution.Descriptor, srcRepo, dstRepo s
return jobStoppedErr return jobStoppedErr
} }
digest := blob.Digest.String() digest := blob.Digest.String()
if blob.MediaType == schema2.MediaTypeForeignLayer {
t.logger.Infof("the blob %s is a foreign layer, skip", digest)
continue
}
t.logger.Infof("copying the blob %s...", digest) t.logger.Infof("copying the blob %s...", digest)
exist, err := t.dst.BlobExist(dstRepo, digest) exist, err := t.dst.BlobExist(dstRepo, digest)
if err != nil { if err != nil {