-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow tagging, pushing, and pulling images #396
Comments
@jesseduffield , for pushing the image, how would the authentication be perfomed, or is it like already been taken care of, if yes, where? |
good question. To my knowledge, docker wouldn't ask you to for a password upon trying to push, it would just fail if you're not already logged into the registry. I'm happy for a login flow to be handled in a separate issue |
Understood. So, which part of this issue can I work on and where should I start for that in the source code? |
All three of the keybindings (tagging, pushing, pulling)
|
You can use this as an example: return gui.createPromptPanel(gui.Tr.CustomCommandTitle, func(g *gocui.Gui, v *gocui.View) error {
command := gui.trimmedContent(v)
return gui.runSubprocess(gui.OSCommand.RunCustomCommand(command))
}) |
Thanks, that helped, @jesseduffield |
@26tanishabanik if you used the string |
I tried with |
Is someone actively working on this issue, if not I would love to pick this up! Also I found that ....
for i, image := range images {
firstTag := ""
tags := image.RepoTags
if len(tags) > 0 {
firstTag = tags[0]
}
... is it something that needs to be fixed as users can now tag images |
I am currently working on it, @glendsoza |
I see that you've taken on a few different issues @26tanishabanik , if you've got other issues in motion it might be worth handing this one off to @glendsoza |
@jesseduffield , I have almost completed the code actually on all those issues, just waiting for your feedback on the question, I asked about the name:tag. |
@26tanishabanik yep go ahead and raise a PR. In response to your question, you say you used |
@jesseduffield , I had tried with |
Perhaps raise a PR and then I can pull it down and check it out myself |
@26tanishabanik the problem is that you're passing the image ID to the I was originally thinking the user would type in an image and then pull the image that they typed in, but I see the use case for pulling the selected image (and tag). Taking a look at docker desktop, it shows images on a per-tag basis, so we should do the same thing i.e. if an image has two separate tags, there should be two entries in the images panel. You can find the code for that in So with that approach, we can now make it so that when you hit 'p' on an image it brings up a confirmation confirming that you want to pull : again. We can do the same thing with pushing. As for tagging, we should actually have two prompts: one for the image name, and one for the image tag. The image name option can be pre-populated with the existing image name. For pulling, we could have extra functionality that allows you to actually enter the name of the image you want to pull, but I'm happy to have a separate issue for that. |
@jesseduffield , if an image is present already, then why to pull it again? |
You might want to pull again if dealing with an immutable tag like 'latest' I'm happy with the image:tag approach in one prompt. |
Is your feature request related to a problem? Please describe.
It would be good if we could tag, push, and pull images from the images panel.
Describe the solution you'd like
Describe alternatives you've considered
The pull feature would benefit from actually trying to search dockerhub, but we can leave that for another PR.
Additional context
the 'p', 'P' thing will be familiar for people who use lazygit
The text was updated successfully, but these errors were encountered: