I don't know if someone is already thinking/working on this but I'd like to share my thoughts and hear yours.
Since, after the oci runtime spec, also the oci image spec is taking shape, I started thinking on how to implement this in rkt.
Possible steps:
Currently the OCI image spec is made of different media types that should be fetched (the OCI image spec doesn't cover distribution) and stored.
Probably big parts of the docker2aci code should be used (copied inside rkt) for implementing the above steps.
One idea will be to convert the OCI runtime config to an ACI manifest (using oci2aci?) so the podmanifest generation and handling done in the stage0 and the various stage1s shouldn't be changed.
rkt image list with an additional type column? What to do if there're different fields between aci images and OCI images that makes this difficult to show in a single table?docker:// urls for both docker V1/V2 registries until it'll be deprecated by the OCI spec?).@sgotti It just happened that I am supposed to work on this effectively starting today ;-) The first step for me is to implement a oci-image-tool, see https://github.com/opencontainers/image-spec/issues/43.
I was thinking of implementing an OCI image library hosted maybe in a (not-yet-existing) github.com/opencontainers/image repository which we could vendor here in rkt leaving the implementation details, like the OCIStore, rendering, validation outside of the rkt code base.
Regarding all your other questions I'm also still in research mode, so maybe we can clarify those iteratively.
@s-urbaniak Thanks! Good to know.
I think that an external library for rendering and validation (like done for the appc/spec) will be good.
To be more accurate in appc/spec the acirenderer will resolve the required files for every dependency and it's up to rkt to render them https://github.com/coreos/rkt/blob/master/pkg/aci/render.go but the OCI image spec is simpler since there isn't a DAG tree but just a list of layers.
I think that the store should live inside rkt (like the current store for ACIs) and probably also fetching (since OCI image spec doesn't cover distribution) should be done inside rkt like the current fetching implementations since they will be very tied to the various rkt options.
Should we keep this issue as a base discussion point for the implementations or do you have other ways to keep in sync?
@sgotti great, many thanks for the pointers!
Let's keep this issue strictly as "implement OCI image/runtime support in rkt" and we can sync via irc, I'm sur on freenode and online in the #rkt-dev channel.
Mentioning here because it's relevant: I recently made a PR against docker2aci that adds docker v2.2 and OCI support: https://github.com/appc/docker2aci/pull/176.
This would result in rkt having the same support for OCI as it does for docker, so it's nothing like the native AppC support rkt has today but if you're interested in copying logic from docker2aci for fetching and/or manifest conversion, it's a starting place.
To keep track, the ongoing work for natively supporting multiple image types and related requirements is here:
Most helpful comment
@sgotti It just happened that I am supposed to work on this effectively starting today ;-) The first step for me is to implement a
oci-image-tool, see https://github.com/opencontainers/image-spec/issues/43.I was thinking of implementing an OCI image library hosted maybe in a (not-yet-existing)
github.com/opencontainers/imagerepository which we could vendor here in rkt leaving the implementation details, like theOCIStore, rendering, validation outside of the rkt code base.Regarding all your other questions I'm also still in research mode, so maybe we can clarify those iteratively.