Re: OSTree and OCI images



On tor, 2016-11-17 at 22:31 +0100, Giuseppe Scrivano wrote:
Hi,

Colin Walters <walters verbum org> writes:


(Email is better for architecture discussions, so moving back here)

On Thu, Nov 17, 2016, at 05:10 AM, Alexander Larsson wrote:


Really the only flatpak specific thing is the mapping from
flatpak arch
strings to golang/oci arch strings.

Hum, maybe we can just have "hook" functions that allow the caller
to tweak the content.


Yeah, I've started extracting this. The first part is ostree
support
for the Docker/OCI layer format (i.e. whiteout handling and file
overriding), which has a PR here:

https://github.com/ostreedev/ostree/pull/578

So can we hash out on the list here - what are the advantages
and disadvantages of this "flattening" approach?

The atomic command right now represents each OCI layer
as an ostree ref.  When we want to deploy a container,
we compute the filesystem tree at checkout.

I've recently thought it would be nice to flatten the layers into the
commit for the image in atomic as well.  The commit for the image at
the
moment contains only the metadata (the important part is the list of
the
OCI layers) used to reconstruct the filesystem.

Due to automatic ostree deduplication I think it would not be
completely horrible to do *both*. I.e. store the individual layers
separately, for use when downloading *other* images, and store the
image itself flattened. You could still store the layer metadata in the
commit if you need it.

In fact, if we wanted we could store the references to the individual
layers (by commit id) in the currently unused "related commits" part of
the ostree commit GVariant. Then we could teach "ostree prune" about
this so that we can (optionally) make sure not to remove layers that
are referenced from installed images.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a notorious flyboy hairdresser on the run. She's a man-hating 
renegade Valkyrie from Mars. They fight crime! 


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