Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Support for multiple image formats and distributions #2925

@sgotti

Description

@sgotti

Currently the accepted rkt image string covers two kind of concepts: image format and distribution.

Distribution is sometime seen as just the transport but IMHO I tend to consider it different (for example appc/spec uses discovery + http or other transports, a docker registry has a specific API backed by http). So I don't see it just as a transport but how I can fetch an image starting with an image string. But, since I can be wrong I'd prefer to hear people more involved in these specs (@jonboulle, @philips)

This is a little table that summarizes them:

image string image format distribution Note
appc image string ACI meta discovery -> transport (ATM http(s))
local file ACI filesystem
http(s):// ACI http(s)
docker:// ACI docker registry v1/v2, oci registry uses docker2aci to fetch a docker image format or OCI image format converted to a squashed ACI

As you can see the current image string format is schemeless for the appc image name string while local files can be both schemeless or file://, remote http files uses http(s)://, docker:// is used to call docker2aci. In rkt every image string format has a specific rkt fetcher (namefetcher, filefetcher, httpfetcher, dockerfetcher).

Since in future rkt will directly support the OCI image format and distributions (currently distribution is outside the OCI image scope). This means the implementation of an OCI store for storing refs and blobs (#2541) (that can also work for docker v2(v2.1 and v2.2) registries) in addition to the ACI store without the conversion to an ACI.

NOTE: I'm not talking about the OCI runtime spec since it's outside this scope (an OCI image should probably be executed just converting the OCI image format config json to an appc manifest):

So keeping the same image string formats trying to specify the image format and distribution can become quite confusing, for example:

image string image format distribution Note
appc image string ACI meta discovery -> transport (atm http(s))
local file ACI filesystem
http(s):// ACI http(s)
docker:// dockerv1:// ACI docker registry v1 uses docker2aci to fetch a docker image v1 format and convert it to a squashed ACI
dockerv2:// or oci:// OCI docker registry v1/v2, oci registry native refs and blobs fetching and saving to the local oci store

The main question is how to specify (in the command line or in a protocol like required by the api-service) the (image format, distribution) pair?
A side question will be: how to maintain the compatibility with the current format?

Some ideas:

  • specify image format, distribution as two different options
  • use a scheme like image format+distribution://

Both ways will keep the current defaults if not specified.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions