ostreedev / ostree-rs-ext

Rust library with higher level APIs on top of the core ostree API
Apache License 2.0
76 stars 25 forks source link

container: Add support for re-exporting a fetched container #642

Closed cgwalters closed 3 months ago

cgwalters commented 3 months ago

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:

$ ostree container image export --repo=/path/to/repo registry:quay.io/exampleos/someos:latest containers-storage:localhost/exampleos

Now...before one gets too excited, this is still suboptimal in a bunch of ways:

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.

Signed-off-by: Colin Walters walters@verbum.org