Skip to content

Commit 7876da2

Browse files
jcarter3sudo-bmitch
andcommitted
Update spec language to support issue #591, pushing multiple tags at once. Also can be used when pushing tags for a non-canonical algorithm (sha-512, blake3)
Co-authored-by: Brandon Mitchell <git@bmitch.net> Signed-off-by: Jeff Carter <jeff.carter@docker.com>
1 parent d59c940 commit 7876da2

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

spec.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,26 @@ The `<location>` is a pullable manifest URL.
511511
The Docker-Content-Digest header returns the digest of the uploaded blob, and MUST be equal to the client provided digest.
512512
Clients MAY ignore the value but if it is used, the client SHOULD verify the value against the uploaded blob data.
513513

514+
When pushing a manifest by digest, the registry MAY support the pushing of tags specified by addition of `tag` query parameters.
515+
If a registry supports this, it:
516+
517+
1. SHOULD support pushing at least 10 tags per request.
518+
1. MAY return a `414 Request-URI Too Long` status if too many tags are included in the request.
519+
1. MUST include an `OCI-Tag` response header, in accordance with [RFC 9110 (section 5)](https://www.rfc-editor.org/rfc/rfc9110#name-fields) semantics, for each accepted tag.
520+
521+
Clients MAY see other status codes (`431 Request Header Fields Too Large`) depending on the registry implementation.
522+
523+
For example, if the client pushed a manifest with the following tags:
524+
```
525+
PUT /v2/<name>/manifests/<digest>?tag=1.2.3&tag=1.2&tag=1&tag=latest
526+
```
527+
528+
The server could respond with the following headers:
529+
```
530+
OCI-Tag: 1.2.3, 1.2, 1
531+
OCI-Tag: latest
532+
```
533+
514534
An attempt to pull a nonexistent repository MUST return response code `404 Not Found`.
515535

516536
A registry SHOULD enforce some limit on the maximum manifest size that it can accept.
@@ -811,15 +831,16 @@ This endpoint MAY be used for authentication/authorization purposes, but this is
811831
#### Endpoints
812832

813833
| ID | Method | API Endpoint | Success | Failure |
814-
| ------- | -------------- | -------------------------------------------------------------- | ----------- | ----------------- |
834+
|---------| -------------- |----------------------------------------------------------------| ----------- |-------------------|
815835
| end-1 | `GET` | `/v2/` | `200` | `404`/`401` |
816836
| end-2 | `GET` / `HEAD` | `/v2/<name>/blobs/<digest>` | `200` | `404` |
817837
| end-3 | `GET` / `HEAD` | `/v2/<name>/manifests/<reference>` | `200` | `404` |
818838
| end-4a | `POST` | `/v2/<name>/blobs/uploads/` | `202` | `404` |
819839
| end-4b | `POST` | `/v2/<name>/blobs/uploads/?digest=<digest>` | `201`/`202` | `404`/`400` |
820840
| end-5 | `PATCH` | `/v2/<name>/blobs/uploads/<reference>` | `202` | `404`/`416` |
821841
| end-6 | `PUT` | `/v2/<name>/blobs/uploads/<reference>?digest=<digest>` | `201` | `404`/`400`/`416` |
822-
| end-7 | `PUT` | `/v2/<name>/manifests/<reference>` | `201` | `404`/`413` |
842+
| end-7a | `PUT` | `/v2/<name>/manifests/<reference>` | `201` | `404`/`413` |
843+
| end-7b | `PUT` | `/v2/<name>/manifests/<digest>?tag=1&tag=2&tag=3` | `201` | `404`/`413` |
823844
| end-8a | `GET` | `/v2/<name>/tags/list` | `200` | `404` |
824845
| end-8b | `GET` | `/v2/<name>/tags/list?n=<integer>&last=<tagname>` | `200` | `404` |
825846
| end-9 | `DELETE` | `/v2/<name>/manifests/<reference>` | `202` | `404`/`400`/`405` |

0 commit comments

Comments
 (0)