Skip to content

Commit 20d21cb

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 20d21cb

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

spec.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,27 @@ 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 `OCI-Tag` field line(s) in the response header:
529+
```
530+
OCI-Tag: 1.2.3, 1.2, 1
531+
OCI-Tag: latest
532+
```
533+
Which would indicate tags `1.2.3`, `1.2`, `1`, and `latest` were created.
534+
514535
An attempt to pull a nonexistent repository MUST return response code `404 Not Found`.
515536

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

813834
| ID | Method | API Endpoint | Success | Failure |
814-
| ------- | -------------- | -------------------------------------------------------------- | ----------- | ----------------- |
835+
|---------| -------------- |----------------------------------------------------------------| ----------- |-------------------|
815836
| end-1 | `GET` | `/v2/` | `200` | `404`/`401` |
816837
| end-2 | `GET` / `HEAD` | `/v2/<name>/blobs/<digest>` | `200` | `404` |
817838
| end-3 | `GET` / `HEAD` | `/v2/<name>/manifests/<reference>` | `200` | `404` |
818839
| end-4a | `POST` | `/v2/<name>/blobs/uploads/` | `202` | `404` |
819840
| end-4b | `POST` | `/v2/<name>/blobs/uploads/?digest=<digest>` | `201`/`202` | `404`/`400` |
820841
| end-5 | `PATCH` | `/v2/<name>/blobs/uploads/<reference>` | `202` | `404`/`416` |
821842
| 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` |
843+
| end-7a | `PUT` | `/v2/<name>/manifests/<reference>` | `201` | `404`/`413` |
844+
| end-7b | `PUT` | `/v2/<name>/manifests/<digest>?tag=1&tag=2&tag=3` | `201` | `404`/`413` |
823845
| end-8a | `GET` | `/v2/<name>/tags/list` | `200` | `404` |
824846
| end-8b | `GET` | `/v2/<name>/tags/list?n=<integer>&last=<tagname>` | `200` | `404` |
825847
| end-9 | `DELETE` | `/v2/<name>/manifests/<reference>` | `202` | `404`/`400`/`405` |

0 commit comments

Comments
 (0)