Draft
Conversation
Signed-off-by: Alano Terblanche <[email protected]>
Signed-off-by: Alano Terblanche <[email protected]>
Signed-off-by: Alano Terblanche <[email protected]>
fc7c58f to
a7e8bb5
Compare
Member
|
I'm all for better search, but please don't make tab completion hit a remote web service 😅 😭 ❤️ |
Contributor
Author
@tianon Could you expand more on your concerns? |
Member
|
Speed, reliability, privacy - feel free to pick any one of these 😅 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added new engine endpoints to proxy image search requests to Docker Hub APIs.
Why?
The engine only supports search using the
v1registry https://github.com/moby/moby/blob/master/api/server/router/image/image.go#L43. But this seems to lack capabilities compared to Docker Hub v3. For instance, leaving out theterm=parameter in the current search would yield no results.The CLI would benefit from completing image names and image tags on
docker pull/run. For exampledocker run [tab][tab]anddocker pull [tab][tab]would retrieve a list of images from Docker Hub. This would allow for the user to search Docker Hub images using CLI completions.Below are some examples of what could be implemented - not necessarily what should :)
A draft PR using these APIs have been implemented in the CLI docker/cli#5528
- What I did
This PR introduces two new API endpoints:
/hub/image/search/hub/image/{name:.*}/getThese endpoints directly communicate with the official Docker Hub APIs, to do image search and retrieve image tags.
https://hub.docker.com/api/search/v3/catalog/searchhttps://hub.docker.com/v2/repositories/library/<image>/tags- How I did it
- How to verify it
Image Search
Image tag search
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)