Skip to content

Commit

Permalink
*: Add OCI links to spec.
Browse files Browse the repository at this point in the history
Signed-off-by: Atlas Kerr <[email protected]>
  • Loading branch information
bsatlas committed Feb 13, 2019
1 parent 55292ea commit abb3778
Showing 1 changed file with 24 additions and 27 deletions.
51 changes: 24 additions & 27 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,8 @@ For reference, the relevant manifest fields for the registry are the following:
|-----------|------------------------------------------------|
| name | The name of the image. |
| tag | The tag for this version of the image. |
| fsLayers | A list of layer descriptors (including digest) |
| signature | A JWS used to verify the manifest content |

For more information about the manifest format, please see [moby/moby#8093](https://github.com/moby/moby/issues/8093).
For more details on the manifest formats and their content types, refer to the OCI Image Specification's [manifest property description](https://github.com/opencontainers/image-spec/blob/master/manifest.md#image-manifest-property-descriptions).

When the manifest is in hand, the client MUST verify the signature to ensure the names and layers are valid.
Once confirmed, the client will then use the digests to download the individual layers.
Expand All @@ -312,11 +310,10 @@ The `name` and `reference` parameter identify the image and are REQUIRED.
The reference MAY include a tag or digest.

The client SHOULD include an Accept header indicating which manifest content types it supports.
For more details on the manifest formats and their content types, see [manifest-v2-1.md](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-1.md) and [manifest-v2-2.md](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md).
In a successful response, the Content-Type header will indicate which manifest type is being returned.

A `404 Not Found` response will be returned if the image is unknown to the registry.
If the image exists and the response is successful, the image manifest will be returned, with the following format (see [moby/moby#8093](https://github.com/moby/moby/issues/8093) for details):
If the image exists and the response is successful, the image manifest will be returned:

```json
{
Expand Down Expand Up @@ -663,28 +660,28 @@ Once all of the layers for an image are uploaded, the client can upload the imag
An image can be pushed using the following request format:

```HTTP
PUT /v2/<name>/manifests/<reference>
Content-Type: <manifest media type>
{
"annotations": {
"com.example.key1": "value1",
"com.example.key2": "value2"
},
"config": {
"digest": "sha256:6f4e69a5ff18d92e7315e3ee31c62165ebf25bfa05cad05c0d09d8f412dae401",
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 452
},
"layers": [
{
"digest": "sha256:6f4e69a5ff18d92e7315e3ee31c62165ebf25bfa05cad05c0d09d8f412dae401",
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"size": 78343
}
],
"schemaVersion": 2
}
PUT /v2/<name>/manifests/<reference>
Content-Type: <manifest media type>
{
"annotations": {
"com.example.key1": "value1",
"com.example.key2": "value2"
},
"config": {
"digest": "sha256:6f4e69a5ff18d92e7315e3ee31c62165ebf25bfa05cad05c0d09d8f412dae401",
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 452
},
"layers": [
{
"digest": "sha256:6f4e69a5ff18d92e7315e3ee31c62165ebf25bfa05cad05c0d09d8f412dae401",
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"size": 78343
}
],
"schemaVersion": 2
}
```

The `name` and `reference` fields of the response body MUST match those specified in the URL.
Expand Down

0 comments on commit abb3778

Please sign in to comment.