|
28 | 28 |
|
29 | 29 | The **Open Container Initiative Distribution Specification** (a.k.a. "OCI Distribution Spec") defines an API protocol to facilitate and standardize the distribution of content. |
30 | 30 |
|
31 | | -While OCI Image is the most prominent, the specification is designed to be agnostic of content types. |
32 | | -Concepts such as "manifests" and "digests", are currently defined in the [Open Container Initiative Image Format Specification](https://github.com/opencontainers/image-spec) (a.k.a. "OCI Image Spec"). |
| 31 | +The specification is designed to be agnostic of content types. |
| 32 | +OCI Image types are currently the most prominent, which are defined in the [Open Container Initiative Image Format Specification](https://github.com/opencontainers/image-spec) (a.k.a. "OCI Image Spec"). |
33 | 33 |
|
34 | 34 | To support other artifact types, please see the [Open Container Initiative Artifact Authors Guide](https://github.com/opencontainers/artifacts) (a.k.a. "OCI Artifacts"). |
35 | 35 |
|
@@ -57,7 +57,7 @@ Several terms are used frequently in this document and warrant basic definitions |
57 | 57 | - **Push**: the act of uploading Blobs and Manifests to a Registry |
58 | 58 | - **Pull**: the act of downloading Blobs and Manifests from a Registry |
59 | 59 | - **Blob**: the binary form of content that is stored by a Registry, addressable by a Digest |
60 | | -- **Manifest**: a JSON document which defines an Artifact. Manifests are defined under the OCI Image Spec <sup>[apdx-2](#appendix)</sup> |
| 60 | +- **Manifest**: a JSON document which defines an artifact uploaded via the manifests endpoint. A manifest may reference other blobs in a repository via descriptors. Examples of manifests are defined under the OCI Image Spec <sup>[apdx-2](#appendix)</sup>, such as the image manifest or the image index.</sup> |
61 | 61 | - **Config**: a blob referenced in the Manifest which contains Artifact metadata. Config is defined under the OCI Image Spec <sup>[apdx-4](#appendix)</sup> |
62 | 62 | - **Artifact**: one conceptual piece of content stored as Blobs with an accompanying Manifest containing a Config |
63 | 63 | - **Digest**: a unique identifier created from a cryptographic hash of a Blob's content. Digests are defined under the OCI Image Spec <sup>[apdx-3](#appendix)</sup> |
@@ -190,11 +190,12 @@ If the blob or manifest is not found in the registry, the response code MUST be |
190 | 190 |
|
191 | 191 | #### Push |
192 | 192 |
|
193 | | -Pushing an artifact typically works in the opposite order as a pull: the blobs making up the artifact are uploaded first, |
194 | | -and the manifest last. Strictly speaking, content can be uploaded to the registry in any order, but a registry MAY reject |
195 | | -a manifest if it references blobs that are not yet uploaded, resulting in a `BLOB_UNKNOWN` error <sup>[code-1](#error-codes)</sup>. |
| 193 | +Pushing an artifact typically works in the opposite order as a pull: the blobs making up the artifact are uploaded first, and the manifest last. |
196 | 194 | A useful diagram is provided [here](https://github.com/google/go-containerregistry/tree/d7f8d06c87ed209507dd5f2d723267fe35b38a9f/pkg/v1/remote#anatomy-of-an-image-upload). |
197 | 195 |
|
| 196 | +A registry MAY reject a manifest of any type uploaded to the manifest endpoint if it references manifests or blobs that do not exist in the registry. |
| 197 | +When a manifest is rejected for this reason, it must result in one or more `MANIFEST_BLOB_UNKNOWN` errors <sup>[code-1](#error-codes)</sup>. |
| 198 | + |
198 | 199 | ##### Pushing blobs |
199 | 200 |
|
200 | 201 | There are two ways to push blobs: chunked or monolithic. |
@@ -557,22 +558,22 @@ The `detail` field is OPTIONAL and MAY contain arbitrary JSON data providing inf |
557 | 558 |
|
558 | 559 | The `code` field MUST be one of the following: |
559 | 560 |
|
560 | | -| ID | Code | Description | |
561 | | -|-------- | ------------------------|------------------------------------------------| |
562 | | -| code-1 | `BLOB_UNKNOWN` | blob unknown to registry | |
563 | | -| code-2 | `BLOB_UPLOAD_INVALID` | blob upload invalid | |
564 | | -| code-3 | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | |
565 | | -| code-4 | `DIGEST_INVALID` | provided digest did not match uploaded content | |
566 | | -| code-5 | `MANIFEST_BLOB_UNKNOWN` | blob unknown to registry | |
567 | | -| code-6 | `MANIFEST_INVALID` | manifest invalid | |
568 | | -| code-7 | `MANIFEST_UNKNOWN` | manifest unknown | |
569 | | -| code-8 | `NAME_INVALID` | invalid repository name | |
570 | | -| code-9 | `NAME_UNKNOWN` | repository name not known to registry | |
571 | | -| code-10 | `SIZE_INVALID` | provided length did not match content length | |
572 | | -| code-12 | `UNAUTHORIZED` | authentication required | |
573 | | -| code-13 | `DENIED` | requested access to the resource is denied | |
574 | | -| code-14 | `UNSUPPORTED` | the operation is unsupported | |
575 | | -| code-15 | `TOOMANYREQUESTS` | too many requests | |
| 561 | +| ID | Code | Description | |
| 562 | +|-------- | ------------------------|------------------------------------------------------------| |
| 563 | +| code-1 | `BLOB_UNKNOWN` | blob unknown to registry | |
| 564 | +| code-2 | `BLOB_UPLOAD_INVALID` | blob upload invalid | |
| 565 | +| code-3 | `BLOB_UPLOAD_UNKNOWN` | blob upload unknown to registry | |
| 566 | +| code-4 | `DIGEST_INVALID` | provided digest did not match uploaded content | |
| 567 | +| code-5 | `MANIFEST_BLOB_UNKNOWN` | manifest references a manifest or blob unknown to registry | |
| 568 | +| code-6 | `MANIFEST_INVALID` | manifest invalid | |
| 569 | +| code-7 | `MANIFEST_UNKNOWN` | manifest unknown to registry | |
| 570 | +| code-8 | `NAME_INVALID` | invalid repository name | |
| 571 | +| code-9 | `NAME_UNKNOWN` | repository name not known to registry | |
| 572 | +| code-10 | `SIZE_INVALID` | provided length did not match content length | |
| 573 | +| code-12 | `UNAUTHORIZED` | authentication required | |
| 574 | +| code-13 | `DENIED` | requested access to the resource is denied | |
| 575 | +| code-14 | `UNSUPPORTED` | the operation is unsupported | |
| 576 | +| code-15 | `TOOMANYREQUESTS` | too many requests | |
576 | 577 |
|
577 | 578 | ### Appendix |
578 | 579 |
|
|
0 commit comments