umoci
umoci copied to clipboard
[proposal] umoci-revert?
At the moment if someone wants to create several variants of a layer on top of some base image, they have to call umoci unpack many times (which is wasteful and slow because of how big most images are). The key question is can we effectively use mtree to revert changes to the rootfs (extracting files if necessary from the blob layers) so that we can return to a pristine rootfs?
- [ ] Refactor
restoreMetadataand the other related code to be usable by anmtreeRevert. - [ ] Create an index of extracted files during
unpackto allow us to know what layer blob (and offset) we need to read to extract the image. - [ ] Lots and lots of testing.
/cc @vbatts since he said he was planning on doing this in go-mtree. I think that because we have mtree.Compare we can do it inside umoci but maybe he has some comments on this.
Requested-by: @hallyn
I think this would play well with the concept of understanding the now v1 OCI image layer. Applying a changeset to the manifest, to arrive at an expected representation. Right? So to revert, one needs to apply a changeset to the manifest structure, then compare.
On Thu, Sep 14, 2017, 19:05 Aleksa Sarai [email protected] wrote:
At the moment if someone wants to create several variants of a layer on top of some base image, they have to call umoci unpack many times (which is wasteful and slow because of how big most images are). The key question is can we effectively use mtree to revert changes to the rootfs (extracting files if necessary from the blob layers) so that we can return to a pristine rootfs?
- Refactor restoreMetadata and the other related code to be usable by an mtreeRevert.
- Create an index of extracted files during unpack to allow us to know what layer blob (and offset) we need to read to extract the image.
- Lots and lots of testing.
/cc @vbatts https://github.com/vbatts since he said he was planning on doing this in go-mtree. I think that because we have mtree.Compare we can do it inside umoci but maybe he has some comments on this.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openSUSE/umoci/issues/172, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEF6Zd5Hh9Yt2ehMX6BdgFYX8RJNH0_ks5sibFRgaJpZM4PYSoI .