You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Mini updates so far
Signed-off-by: Peter Engelbert <[email protected]>
* rest of the updates so far
Signed-off-by: Peter Engelbert <[email protected]>
* Slight modifications based on comments
Signed-off-by: Peter Engelbert <[email protected]>
* Address *-Content-Digest headers
Signed-off-by: Peter Engelbert <[email protected]>
* Revert to old wording pertaining to digests
Signed-off-by: Peter Engelbert <[email protected]>
Copy file name to clipboardExpand all lines: spec.md
+50-36Lines changed: 50 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,10 @@
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 this specification is designed to be agnostic to content types, much of it is centered around the distribution of container images.
32
-
Many of the concepts here, such as "manifests" and "digests", are originally defined in the [Open Container Initiative Image Format Specification](https://github.com/opencontainers/image-spec) (a.k.a. "OCI Image Spec"),
33
-
and the OCI Image is considered to be the primary supported artifact type.
31
+
While OCI Image is the most prominent, the specification is designed to be agnostic of content types. Concepts such as "manifests" and "digests",
32
+
are currently defined in the [Open Container Initiative Image Format Specification](https://github.com/opencontainers/image-spec) (a.k.a. "OCI Image Spec").
34
33
35
-
For guidance on how to apply this specification to other artifact types, please see the [Open Container Initiative Artifact Authors Guide](https://github.com/opencontainers/artifacts/blob/master/artifact-authors.md) (a.k.a. "OCI Artifacts").
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").
36
35
37
36
### Historical Context
38
37
@@ -44,6 +43,11 @@ For relevant details and a history leading up to this specification, please see
Because of the origins this specification, the client MAY encounter Docker-specific headers, such as `Docker-Content-Digest`,
49
+
or `Docker-Distribution-API-Version`. These headers are OPTIONAL and clients SHOULD NOT depend on them.
50
+
47
51
### Definitions
48
52
49
53
Several terms are used frequently in this document and warrant basic definitions:
@@ -54,7 +58,7 @@ Several terms are used frequently in this document and warrant basic definitions
54
58
-**Pull**: the act of downloading Blobs and Manifests from a Registry
55
59
-**Blob**: the binary form of content that is stored by a Registry, addressable by a Digest
56
60
-**Manifest**: a JSON document which defines an Artifact. Manifests are defined under the OCI Image Spec <sup>[apdx-2](#appendix)</sup>
57
-
-**Config**: a section in the Manifest (and associated Blob) which contains Artifact metadata
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>
58
62
-**Artifact**: one conceptual piece of content stored as Blobs with an accompanying Manifest containing a Config
59
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>
60
64
-**Tag**: a custom, human-readable Manifest identifier
@@ -72,7 +76,6 @@ TODO: more detail on workflows related
72
76
A container engine would like to run verified image named "library/ubuntu", with the tag "latest".
73
77
The engine contacts the registry, requesting the manifest for "library/ubuntu:latest".
74
78
An untrusted registry returns a manifest.
75
-
Before proceeding to download the individual layers, the engine verifies the manifest's signature, ensuring that the content was produced from a trusted source and no tampering has occurred.
76
79
After each layer is downloaded, the engine verifies the digest of the layer, ensuring that the content matches that specified by the manifest.
77
80
78
81
### Resumable Push
@@ -98,7 +101,12 @@ If process A and B upload the same layer at the same time, both operations will
98
101
Even in the case where both uploads are accepted, the registry may securely only store one copy of the layer since the computed digests match.
99
102
100
103
## Conformance
101
-
TODO: add general text about artifact validation requirements
104
+
105
+
For more information on testing for conformance, please see the [conformance README](./conformance/README.md)
106
+
107
+
### Official Certification
108
+
109
+
Registry providers can self-certify by submitting conformance results to [opencontainers/oci-conformance](https://github.com/opencontainers/oci-conformance).
102
110
103
111
### Requirements
104
112
@@ -111,10 +119,6 @@ Registries conforming to this specification MUST handle all APIs required by the
111
119
112
120
In order to test a registry's conformance against these workflow categories, please use the [conformance testing tool](./conformance/).
113
121
114
-
### Official Certification
115
-
116
-
Registry providers can self-certify by submitting conformance results to [opencontainers/oci-conformance](https://github.com/opencontainers/oci-conformance).
117
-
118
122
### Workflow Categories
119
123
120
124
#### Pull
@@ -128,10 +132,18 @@ To pull a manifest, perform a `GET` request to a url in the following form:
A GET request to an existing manifest URL MUST provide the expected manifest, with a response code that MUST be `200 OK`.
134
140
141
+
The `OCI-Content-Digest` header (or, as a fallback, `Docker-Content-Digest` header), if present on the response, returns the canonical
142
+
digest of the uploaded blob which MAY differ from the provided digest. If the digest does differ, it MAY be the case that
143
+
the hashing algorithms used do not match. See [Content Digests](./detail.md) for information on how to detect the hashing
144
+
algorithm in use. Most clients MAY ignore the value, but if it is used, the client MUST verify the value against the uploaded
145
+
blob data.
146
+
135
147
If the manifest is not found in the registry, the response code MUST be `404 Not Found`.
136
148
137
149
##### Pulling Blobs
@@ -185,7 +197,7 @@ Successful completion of the request MUST return either a `201 Created` or a `20
185
197
Location: <blob-location>
186
198
```
187
199
188
-
With`<blob-location>`being a pullable blob URL.
200
+
Here,`<blob-location>`is a pullable blob URL.
189
201
190
202
---
191
203
@@ -205,7 +217,8 @@ Location: <location>
205
217
206
218
The `<location>` MUST contain a UUID representing a unique session ID for the upload to follow.
207
219
208
-
Optionally, the location MAY be absolute (containing the protocol and/or hostname), or it MAY be relative (containing just the URL path).
220
+
Optionally, the location MAY be absolute (containing the protocol and/or hostname), or it MAY be relative (containing just the URL path). For more information,
221
+
see [RFC 7231](https://tools.ietf.org/html/rfc7231#section-7.1.2).
209
222
210
223
Once the `<location>` has been obtained, perform the upload proper by making a `PUT` request to the following URL path, and with the following headers and body:
211
224
@@ -308,24 +321,24 @@ Here, `<blob-location>` is a pullable blob URL.
308
321
If a necessary blob exists already in another repository, it can be mounted into a different repository via a `POST`
| code-13 |`DENIED`| requested access to the resource is denied |
509
+
| code-14 |`UNSUPPORTED`| the operation is unsupported |
510
+
| code-15 |`TOOMANYREQUESTS`| too many requests |
498
511
499
512
### Appendix
500
513
@@ -506,3 +519,4 @@ The following is a list of documents referenced in this spec:
506
519
| apdx-1 |[Details](./detail.md)| Historical document describing original API endpoints and requests in detail (warning: some of this information may be out-of-date or not yet implemented) |
507
520
| apdx-2 |[OCI Image Spec - manifests](https://github.com/opencontainers/image-spec/blob/v1.0.1/manifest.md)| Description of manifests, defined by the OCI Image Spec |
508
521
| apdx-3 |[OCI Image Spec - digests](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md#digests)| Description of digests, defined by the OCI Image Spec |
522
+
| apdx-4 |[OCI Image Spec - config](https://github.com/opencontainers/image-spec/blob/v1.0.1/config.md)| Description of configs, defined by the OCI Image Spec |
0 commit comments