Merge pull request #869 from tonistiigi/inline-uncompressed

remotecache: allow uncompressed digest in inline export
docker-19.03 v0.4.0
Akihiro Suda 2019-03-14 12:55:16 +09:00 committed by GitHub
commit c35410878a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,13 @@ func (ce *exporter) ExportForLayers(layers []digest.Digest) ([]byte, error) {
for _, k := range layers {
if v, ok := descs[k]; ok {
descs2[k] = v
continue
}
// fallback for uncompressed digests
for _, v := range descs {
if uc := v.Descriptor.Annotations["containerd.io/uncompressed"]; uc == string(k) {
descs2[v.Descriptor.Digest] = v
}
}
}