From ff8f85da92efe06e8c37ed821dc1d95b157a31e8 Mon Sep 17 00:00:00 2001 From: Yinon Avraham Date: Tue, 25 Oct 2022 16:53:15 +0300 Subject: [PATCH 1/3] Add a header with manifest tag to pull and push Signed-off-by: Yinon Avraham --- spec.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec.md b/spec.md index 297e2745..d9204a72 100644 --- a/spec.md +++ b/spec.md @@ -157,6 +157,10 @@ The `Content-Type` header SHOULD match what the client [pushed as the manifest's If the manifest has a `mediaType` field, clients SHOULD reject unless the `mediaType` field's value matches the type specified by the `Content-Type` header. For more information on the use of `Accept` headers and content negotiation, please see [Content Negotiation](./content-negotiation.md). +The client SHOULD include a `Docker-Manifest-Tag` header indicating which manifest tag is being pulled. +This header SHOULD be added to all requests throughout the pull process. +Registries MAY use this value as a hint when handling the pulled manifests and blobs. + A GET request to an existing manifest URL MUST provide the expected manifest, with a response code that MUST be `200 OK`. A successful response SHOULD contain the digest of the uploaded blob in the header `Docker-Content-Digest`. @@ -201,6 +205,10 @@ A useful diagram is provided [here](https://github.com/google/go-containerregist 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. When a manifest is rejected for this reason, it must result in one or more `MANIFEST_BLOB_UNKNOWN` errors [code-1](#error-codes). +The client SHOULD include a `Docker-Manifest-Tag` header indicating which manifest tag is being pushed. +This header SHOULD be added to all requests throughout the push process. +Registries MAY use this value as a hint when handling the pushed manifests and blobs. + ##### Pushing blobs There are two ways to push blobs: chunked or monolithic. From d775493991462a4287a2bb3e95438f9ec01f2476 Mon Sep 17 00:00:00 2001 From: Yinon Avraham Date: Mon, 14 Nov 2022 15:32:03 +0200 Subject: [PATCH 2/3] Fix based on PR comments - Rename header to OCI-Named-Ref - Remove "hint" - Merge to a single sentence, one for pull, one for push - Change SHOULD to MAY in the push process Signed-off-by: Yinon Avraham --- spec.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec.md b/spec.md index d9204a72..c1eaa441 100644 --- a/spec.md +++ b/spec.md @@ -157,9 +157,7 @@ The `Content-Type` header SHOULD match what the client [pushed as the manifest's If the manifest has a `mediaType` field, clients SHOULD reject unless the `mediaType` field's value matches the type specified by the `Content-Type` header. For more information on the use of `Accept` headers and content negotiation, please see [Content Negotiation](./content-negotiation.md). -The client SHOULD include a `Docker-Manifest-Tag` header indicating which manifest tag is being pulled. -This header SHOULD be added to all requests throughout the pull process. -Registries MAY use this value as a hint when handling the pulled manifests and blobs. +The client SHOULD include an `OCI-Named-Ref` header on each request to indicate which manifest is being pulled. A GET request to an existing manifest URL MUST provide the expected manifest, with a response code that MUST be `200 OK`. A successful response SHOULD contain the digest of the uploaded blob in the header `Docker-Content-Digest`. @@ -205,9 +203,7 @@ A useful diagram is provided [here](https://github.com/google/go-containerregist 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. When a manifest is rejected for this reason, it must result in one or more `MANIFEST_BLOB_UNKNOWN` errors [code-1](#error-codes). -The client SHOULD include a `Docker-Manifest-Tag` header indicating which manifest tag is being pushed. -This header SHOULD be added to all requests throughout the push process. -Registries MAY use this value as a hint when handling the pushed manifests and blobs. +The client MAY include an `OCI-Named-Ref` header on each request to indicate which manifest is being pushed. ##### Pushing blobs From a579a51f72b7b0aa0cb04e738f3aaae8279ff2cd Mon Sep 17 00:00:00 2001 From: Yinon Avraham Date: Tue, 15 Nov 2022 09:32:57 +0200 Subject: [PATCH 3/3] Rename OCI-Named-Ref to OCI-Ref Signed-off-by: Yinon Avraham --- spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.md b/spec.md index c1eaa441..987e1c30 100644 --- a/spec.md +++ b/spec.md @@ -157,7 +157,7 @@ The `Content-Type` header SHOULD match what the client [pushed as the manifest's If the manifest has a `mediaType` field, clients SHOULD reject unless the `mediaType` field's value matches the type specified by the `Content-Type` header. For more information on the use of `Accept` headers and content negotiation, please see [Content Negotiation](./content-negotiation.md). -The client SHOULD include an `OCI-Named-Ref` header on each request to indicate which manifest is being pulled. +The client SHOULD include an `OCI-Ref` header on each request with the full image reference to indicate which manifest is being pulled. A GET request to an existing manifest URL MUST provide the expected manifest, with a response code that MUST be `200 OK`. A successful response SHOULD contain the digest of the uploaded blob in the header `Docker-Content-Digest`. @@ -203,7 +203,7 @@ A useful diagram is provided [here](https://github.com/google/go-containerregist 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. When a manifest is rejected for this reason, it must result in one or more `MANIFEST_BLOB_UNKNOWN` errors [code-1](#error-codes). -The client MAY include an `OCI-Named-Ref` header on each request to indicate which manifest is being pushed. +The client MAY include an `OCI-Ref` header on each request with the full image reference to indicate which manifest is being pushed. ##### Pushing blobs