Skip to content
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

Cannot get image manifest or delete tag from a private registry #4348

Closed
AxelVoitier opened this issue Jul 26, 2024 · 5 comments · Fixed by #4354
Closed

Cannot get image manifest or delete tag from a private registry #4348

AxelVoitier opened this issue Jul 26, 2024 · 5 comments · Fixed by #4354

Comments

@AxelVoitier
Copy link

AxelVoitier commented Jul 26, 2024

Hello,

Using extension version 1.29.1.

I have a private registry setup (pretty much barebone from distribution, version 2.8.3, just having TLS enabled). I cannot get the manifest of any image in that registry. Neither can I delete any tag (because apparently the first step in deleting is fetching the manifest).

Error given in vscode is "failed with status 404: Not Found".
Looking at the registry logs, I get the following:

registry-1  | 10.x.x.x - - [26/Jul/2024:09:50:52 +0000] "GET /v2/USER/IMAGE/manifests/TAG HTTP/1.1" 404 117 "" "node"
registry-1  | time="2024-07-26T09:50:52.803491926Z" level=error msg="response completed with error" err.code="manifest unknown" err.message="OCI index found, but accept header does not support OCI indexes" go.version=go1.20.8 http.request.host="ADDRESS:PORT" http.request.id=a6497708-9e95-49fe-ab1e-345a17fd04f4 http.request.method=GET http.request.remoteaddr="10.x.x.x:59214" http.request.uri="/v2/USER/IMAGE/manifests/TAG" http.request.useragent=node http.response.contenttype="application/json; charset=utf-8" http.response.duration=3.656995ms http.response.status=404 http.response.written=117 vars.name="USER/IMAGE" vars.reference=TAG 

If I search on this OCI accept header error, I get the following:
https://my.f5.com/manage/s/article/K000138411
Basically saying the request should be made with two particular accept headers:
-H "Accept: application/vnd.oci.image.manifest.v1+json" -H "Accept: application/vnd.oci.image.index.v1+json"

Possibly related to #4309 (comment)

Cheers,
Axel

@AxelVoitier
Copy link
Author

Testing direct access to the registry with curl, I indeed need to accept application/vnd.oci.image.index.v1+json content to retrieve it.
See https://github.com/opencontainers/image-spec/blob/main/image-index.md.

This seems to be because I am storing multiplatform images in that registry. Or, actually, in some cases the images are single platform (ARM), but they were built using a multiplatform-enabled buildx builder.

@bwateratmsft
Copy link
Collaborator

Might just need to bump vscode-docker-extensibility so this PR gets picked up: microsoft/vscode-docker-extensibility#225

@danegsta
Copy link
Contributor

danegsta commented Aug 1, 2024

This should be resolved with the updated @microsoft/vscode-docker-registries package that was just merged

@danegsta danegsta closed this as completed Aug 1, 2024
@danegsta
Copy link
Contributor

Release 1.29.2 was just published to the marketplace with a fix for this issue.

@AxelVoitier
Copy link
Author

Hello,

I can confirm fetching manifest and deleting multiplatform image works now. Thanks 👍 .

Cheers,
Axel

@microsoft microsoft locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants