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

Wrong digest returned by get_manifest for V2 registry #51

Open
Vadiml1024 opened this issue Nov 3, 2017 · 2 comments
Open

Wrong digest returned by get_manifest for V2 registry #51

Vadiml1024 opened this issue Nov 3, 2017 · 2 comments

Comments

@Vadiml1024
Copy link

The GET .../repository/manifests/tagname request should be using

Accept: application/vnd.docker.distribution.manifest.v2+json header do get correct manifest and digest

@linnil1
Copy link

linnil1 commented Nov 10, 2018

Change this.

--- a/docker_registry_client/_BaseClient.py
+++ b/docker_registry_client/_BaseClient.py
@@ -187,7 +187,6 @@ class BaseClientV2(CommonBaseClient):
         self.auth.desired_scope = 'repository:%s:*' % name
         response = self._http_response(
             self.MANIFEST, get, name=name, reference=reference,
-            schema=self.schema_1_signed,
         )
         self._cache_manifest_digest(name, reference, response=response)
         return _Manifest(

Also, Do this code need to change ?

@@ -204,7 +203,7 @@ class BaseClientV2(CommonBaseClient):
 
         return self._http_call(
             self.MANIFEST, put, data=sign_manifest(content),
-            content_type=self.schema_1_signed, schema=self.schema_1_signed,
+            content_type=self.schema_1_signed,
             name=name, reference=reference,
         )

@djmattyg007
Copy link

Hello. Since this package appears to be abandoned, I forked it to implement various improvements. In particular, I removed support for v1 registries and massively improved support for v2 manifests (including multi-arch manifests).

I'd appreciate it if you could give it a go and let me know how you go:

https://github.com/djmattyg007/dreg-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants