oci-references

Description

The command line client supports a special notation scheme for specifying references to instances of oci like registries. This allows for specifying references to any registry supported by the OCM toolset that can host OCI artifacts. As a subset the regular OCI artifact notation used for docker images are possible:

[+][<type>::][./][<file path>//<repository>[:<tag>][@<digest>]

or

[+][<type>::][<json repo spec>//]<repository>[:<tag>][@<digest>]

Notice that if you specify the <type> in the beginning of this notation AND in the <json repo spec>, the types have to match (but there is no reason to specify the type in both places).

or

[+][<type>::][<scheme>://]<domain>[:<port>][/]/<repository>[:<tag>][@<digest>]

Notice that this notation optionally also allows a double slash to seperate <domain>[:<port>] and <repository>. While it is not necessary for unambiguous parsing here, it is supported for consistency with the other notations.

or

[+][<type>::][<scheme>://]<host>:<port>/<repository>[:<tag>][@<digest>]

Notice that <port> is required in this notation. Without <port>, this notation would be ambiguous with the docker library notation mentioned below.

or

[+][<type>::][<scheme>://]<host>[:<port>]//<repository>[:<tag>][@<digest>]

Notice the double slash (//) before the <repository>. This serves as a clear separator between <host>[:<port>] and <repository>. Thus, with this notation, the port is optional and can therefore be omitted without creating ambiguity with the docker library notation mentioned below.

or

<docker library>[:<tag>][@<digest>]

or

<docker repository>/<docker image>[:<tag>][@<digest>]

Besides dedicated artifacts it is also possible to denote registries as a whole:

[+][<type>::][./]<file path>

or

[+][<type>::]<json repo spec>

Notice that if you specify the <type> in the beginning of this notation AND in the <json repo spec>, the types have to match (but there is no reason to specify the type in both places).

or

[+][<type>::][<scheme>://]<domain>[:<port>]

or

[+][<type>::][<scheme>://]<host>[:<port>]

Notice that <port> is optional in this notation since this cannot be an image reference and therefore cannot be ambiguous with the docker library notation.

The optional + is used for file based implementations (Common Transport Format) to indicate the creation of a not yet existing file.

The type may contain a file format qualifier separated by a + character. The following formats are supported: directory, tar, tgz

Examples


+ctf+directory::./ocm/ctf//ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625

oci::{"baseUrl": "ghcr.io"}//open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625

oci::https://ghcr.io/open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625
oci::https://ghcr.io//open-component-model/ocm/ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625

oci::http://localhost:8080/ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625
oci::http://localhost:8080//ocm.software/ocmcli/ocmcli-image:0.7.0@sha256:29c842be1ef1da67f6a1c07a3a3a8eb101bbcc4c80f174b87d147b341bca9625

ubuntu:24.04
ubuntu

tensorflow/tensorflow:2.15.0
tensorflow/tensorflow

See Also