Update differ to support compressed archives

Differ is updated to set a label for the uncompressed hash
of compressed content. This allows compressed blobs to
be used and looked up for their uncompressed hashes.
Uses commit options to set labels.
Updates rootfs default to create compressed archives.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2017-08-09 22:35:49 -07:00
parent dee8dc2cda
commit da34812db6
2 changed files with 32 additions and 18 deletions

View File

@@ -49,5 +49,5 @@ func Diff(ctx context.Context, snapshotID, contentRef string, sn snapshot.Snapsh
defer sn.Remove(ctx, lowerKey)
}
return md.DiffMounts(ctx, lower, upper, ocispec.MediaTypeImageLayer, contentRef)
return md.DiffMounts(ctx, lower, upper, ocispec.MediaTypeImageLayerGzip, contentRef)
}