container: Add support for re-exporting a fetched container
The status quo today is basically that with a "pure ostree"
container image, one can pull it, and one can re-export
it with ostree container encapsulate...but doing so
loses all chunking i.e. you end up with a single
giant layer again.
Further, we don't support exporting derived images at all.
Fix both of these with a new CLI and API, for example:
Now...before one gets too excited, this is still suboptimal
in a bunch of ways:
Copying to containers-storage is super inefficient, we indirect
through a local oci directory because of the lack of "push"
support in containers-image-proxy, and we end up with a full
physical copy of the files even when we could reflink;
cc https://github.com/containers/storage/issues/1849
Because we don't currently save tar-split data, the use
case of pushing to a registry is virtually guaranteed to produce
changed diffids, and we'll hence end up duplicating layers
on the registry
Now what is more interesting is that this code is going to help
us a bit for the use case of "recommitting" a derived container
image.
chunking: Add some doc comments
Just a drive by.
container: Add support for re-exporting a fetched container
The status quo today is basically that with a "pure ostree" container image, one can pull it, and one can re-export it with
ostree container encapsulate
...but doing so loses all chunking i.e. you end up with a single giant layer again.Further, we don't support exporting derived images at all.
Fix both of these with a new CLI and API, for example:
Now...before one gets too excited, this is still suboptimal in a bunch of ways:
containers-storage
is super inefficient, we indirect through a localoci
directory because of the lack of "push" support in containers-image-proxy, and we end up with a full physical copy of the files even when we could reflink; cc https://github.com/containers/storage/issues/1849Now what is more interesting is that this code is going to help us a bit for the use case of "recommitting" a derived container image.
Signed-off-by: Colin Walters walters@verbum.org