-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: run
and pull
image completion from hub
#5528
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Alano Terblanche <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5528 +/- ##
==========================================
- Coverage 60.67% 60.47% -0.21%
==========================================
Files 345 345
Lines 23488 23570 +82
==========================================
+ Hits 14252 14253 +1
- Misses 8263 8344 +81
Partials 973 973 |
Signed-off-by: Alano Terblanche <[email protected]>
8511401
to
5760a3d
Compare
cli/command/completion/functions.go
Outdated
|
||
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil) | ||
if err != nil { | ||
logrus.Errorf("Error creating hub image tags request: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know what the best way would be for us to track errors for the completions. Maybe we should write debug logs to a file?
Signed-off-by: Alano Terblanche <[email protected]>
Signed-off-by: Alano Terblanche <[email protected]>
- What I did
Cobra completions using the Docker Hub v3 image search API.
The API is proxied through the docker engine: moby/moby#48692
Completion of images when calling
docker run/pull
from local images and Docker Hub.Allows for image search based on partial matches. Also allows image tag search when adding
:
after the image name.- How I did it
- How to verify it
Setup completion file https://docs.docker.com/engine/cli/completion/
docker completion <fish|bash|zsh> > <completion file>
docker run [tab][tab]
docker run postg[tab][tab]
docker run postgres:[tab][tab]
docker run postgres:alpine[tab][tab]
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)