umoci icon indicating copy to clipboard operation
umoci copied to clipboard

generate flattened rootfs archives

Open cyphar opened this issue 8 years ago • 1 comments

This issue is left so that I can track @davidcassany's request. Effectively for docker-library publishing it'd be nice to be able to get umoci to output an archive of the directory that /would/ have been extracted so that we don't have to worry about --rootless if we're just going to be forwarding those archives. This can be done if we have the following two (already-proposed) features:

  1. The ability to squash image layers. Bonus points if it's like git rebase -- #168. Let this be called umoci rebase.
  2. The ability to take a layer (or set of layers) that needs to be extracted and output them to an archive. This could be an extension of umoci raw-unpack, to allow it to take a set of layers and then output it as a tar archive rather than touching the filesystem. #23

If (2) supports multiple layers the logic would be identical to the squashing logic necessary for (1) anyway. Might as well implement both. The example usage would be:

% umoci rebase --squash-all --image some_image
% umoci raw unpack-layers --image some_image --tar > image.tar

cyphar avatar Oct 30 '17 13:10 cyphar

/cc @tych0 -- This is probably related to what you've done with stacker.

cyphar avatar Nov 14 '18 05:11 cyphar