-
Notifications
You must be signed in to change notification settings - Fork 69
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
Feature Request: authenticated api/https request #183
Comments
Thanks for reporting; as this is for commands interacting with the registry, this may be more appropriate in the https://github.com/docker/hub-tool repository, which is a (still beta / preview) cli to interact with Docker Hub. Let me transfer this ticket to that repository. |
FWIW, if you're specifically looking for ways to remove tags; that's already provided by this tool;
|
I didn't know that this repo existed, but this repo only solves the problem if you are using dockerhub, but not if you are using a different registry. |
Yes, this tool is primarily to interact with Docker Hub. Authentication with registries unfortunately can be somewhat tricky (as not all parts of that are part of the distribution specification, so can be implementation specific). You may be interested in https://github.com/regclient/regclient, which is written by Docker Captain @sudo-bmitch, and a more generic tool. |
Most registries are good and follow the HTTP specs for the WWW-Authenticate/Authorization headers for Basic and Bearer tokens. However, there are exceptions that require you to impersonate a docker client and build the authorization scope yourself. I think you're quickly getting into territory where you'll want to write your own client if you aren't calling the registry/2.0 or OCI distribution-spec APIs. |
This function would include a new cli command that has arguments similar to curl or wget and sends an authenticated http request to a selected registry host.
Use case:
Using the docker hub api (e.g. delete images) or using other endpoints of other registries.
Proposal:
In order to be able to use this feature, you must of course first log in to the registration if you are not yet.
After that you would be able to run:
options: similar to curl; e.g for changing the method, add headers or specify the body
registry+endpoint: The url of the request; registry is optional and by default dockerhub.
For example:
sould be equivalent to:
The text was updated successfully, but these errors were encountered: