-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add blob copy capability #54
base: master
Are you sure you want to change the base?
Conversation
The way that the auth url was being used by AuthorizationService was too restrictive and made too many assumptions about the format of the URL; GitLab, for example, uses a different URL format and does not name the service the same as DockerHub does. These changes add a parameter, 'auth_service_name', which allows custom service names that are not simply the same as the registry's host name (e.g. GitlLab uses 'container_registry'), and also changes the URL so that the 'v2/token' location is not necessarily assumed. *This is necessarily a breaking change for existing consumers and will require a majorversion bump*.
This prevents the access token from being sent by the requests library
Rather than forcing command-line and API consumers to change their code, we keep the old arguments and behavior in, but add a warning, allowing the new behavior to be triggered with new arguments
This puts it in the user's PATH upon package installation
Put errors checking before status checking
This takes advantage of the Registry API's cross-repository mount feature to copy blobs from one repo to another without actually downloading and reuploading them. Unit test included.
Hello @graingert, this is the PR for the feature I described in the last one: cross-repositiory blob mounting. Please let me know if it requires any changes. Thanks! |
This method checks for the existence of a manifest without downloading it by sending a HEAD request rather than a GET request to the manifest endpoint
This allows consumers to calculate their own digests and put a tag to its digest location, without changing the tag
Hello. Since this package appears to be abandoned, I forked it and made several improvements. This includes dropping support for v1 registries, and introducing first-class support for v2 manifests (incluidng multi-arch manifests). If you're still feeling up to it, I'd be happy to review an updated PR against my fork: |
Meant to be merged in after #53.
This PR adds a method to the V2 BaseClient:
copy_blob
. The method takes advantage of the Registry API's cross-repository blob mount feature to copy blobs that already exist in the registry from one repo to another without actually downloading and re-uploading them.A unit test is included.
Other minor changes in this PR:
check_manifest
method to test for the existence of a manifestput_manifest
(Root cause was a Docker Registry config issue in testing)put_manifest
: now consumers can put manifests using their digest as a reference without updating the tag to be the same as the digest (which was the former, erroneous behavior)manifest.digest
) to enable users to PUT manifests by digest.