OSTree and OCI images



Yesterday I landed support in flatpak to support exporting and
importing flatpak apps to an OCI image spec[1] repository on disk.
It turns out that this code is quite unspecific to flatpak, and could
really be useful for any kind of ostree repo.

Here is the helper code:
https://github.com/flatpak/flatpak/blob/master/app/flatpak-oci.c

And here is the code that exports to oci:
https://github.com/flatpak/flatpak/blob/master/app/flatpak-builtins-build-bundle.c#L386

And the code that imports:
https://github.com/flatpak/flatpak/blob/master/app/flatpak-builtins-build-import-bundle.c#L65

It uses some annotations that are "org.flatpak.XXX", but these could
easily be made ostree-specific instead.

The code currently only supports local directories, but (at least for
reading) it would be pretty simple to make FlatpakOciDir also support
downloading from a remote http repository. We could perhaps even go so
far as to make a special form of ostree remotes that pull from OCI
repositories.

Is there any interest in this? (Note: it does add a new json-glib
dependency to ostree.)


[1] https://github.com/opencontainers/image-spec/blob/master/image-layout.md

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a scarfaced day-dreaming matador on a search for his missing sister. 
She's a mentally unstable belly-dancing pearl diver with a birthmark 
shaped like Liberty's torch. They fight crime! 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]