Skip to content

registry: add reference #22497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

craig-osterhout
Copy link
Contributor

@craig-osterhout craig-osterhout commented Apr 25, 2025

Description

Re-add registry reference from point in time of deletion at #18390, not upstream.

https://deploy-preview-22497--docsdocker.netlify.app/reference/api/registry/
https://deploy-preview-22497--docsdocker.netlify.app/reference/api/registry/token/

Related issues or tickets

ENGDOCS-2577

Reviews

  • Technical review
  • Editorial review
  • Product review

@craig-osterhout craig-osterhout added the area/hub Issue affects Docker Hub label Apr 25, 2025
@github-actions github-actions bot added area/compose Relates to docker-compose.yml spec or docker-compose binary area/api Relates to Docker API docs labels Apr 25, 2025
Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 8923720
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/682774d140f85c00083486a7
😎 Deploy Preview https://deploy-preview-22497--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@craig-osterhout craig-osterhout requested a review from a team May 7, 2025 20:52
@craig-osterhout craig-osterhout added status/review and removed area/compose Relates to docker-compose.yml spec or docker-compose binary labels May 7, 2025
Copy link
Collaborator

@sarahsanders-docker sarahsanders-docker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before I do a more thorough review, I left a comment about why we are not using an OpenAPI spec to generate the documentation here

Updated Registry API Documentation
@craig-osterhout craig-osterhout requested a review from jcarter3 May 15, 2025 16:58
Signed-off-by: Craig <[email protected]>
Signed-off-by: Craig <[email protected]>
Signed-off-by: Craig <[email protected]>
Comment on lines +79 to +90
The image manifest can be fetched with the following URL:

```text
GET /v2/<name>/manifests/<reference>
```

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. In a successful response, the Content-Type
header will indicate which manifest type is being returned.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have a response?

ex:

{
  "schemaVersion": 2,
  "config": { "digest": "sha256:..." },
  "layers": [
    { "digest": "sha256:..." },
    ...
  ]
}

The parameters of this request are the image namespace under which the layer
will be linked. Responses to this request are covered in the following sections.

#### Existing layers
Copy link
Collaborator

@sarahsanders-docker sarahsanders-docker May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this step be done first technically? same with the existing image one above? it might make more sense to check for existing ones beforehand

a logical order here might be:

  1. Check for existing layers (HEAD call and response)
  2. Start layer upload (POST call and response)
  3. Upload blob (PUT/PATCH calls and response)
  4. Complete upload (PUT call and response)
  5. Cancel upload (DELETE call and response)

Copy link
Collaborator

@sarahsanders-docker sarahsanders-docker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a bunch of inline comments, but overall:

  • For every endpoint, ideally we would have: Request syntax (covered this well) and a valid response example (we are missing these)
  • Some of the steps feel like they are out of order. Maybe this is my misunderstanding of how to use the Registry API, but I left some comments about checking if layers/images exist coming before the rest of the steps.
  • Lots of gerunds in headings make it hard to skim/find action oriented phrases, I would suggest changing the headings to remove gerunds so I can skim the content and look for actions I want to execute
  • Lots of headings don't appear on the right TOC which makes it hard to skim and find what I am looking for. Ideally I would see the entire API in the TOC so I can jump to the endpoint I want

A good example format for endpoint patterns might be something like (this keeps it easy to skim and get all the info I need per endpoint):

Get image manifest

GET /v2//manifests/

Required headers:

  • Accept: example
  • Authorization: Bearer

Success response:

example of request response `200 OK` w/ Content-type

Possible errors:

  • 401
  • 404

Happy to help restructure this if you want me to overhaul the endpoint sections for you to commit changes @craig-osterhout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Relates to Docker API docs area/hub Issue affects Docker Hub status/review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants