Skip to content

Conversation

@nalind
Copy link
Member

@nalind nalind commented Mar 23, 2017

Add some minimal image management commands. Neither is really in scope for a building tool, but it reduces the number of use cases where we need additional tools.

return nil
}
app.Commands = []cli.Command{
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought this was going to be list?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're already using "list" for listing containers that buildah is working with, though I could be swayed to "list-images" to parallel with "delete-image".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, ignore this. I'd forgotten list was for containers. Images is good.

Usage: "omit column headings",
},
cli.BoolFlag{
Name: "qq",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the online context, qq means 'crying eyes' or 'just quit the game as you've no skills'. Perhaps --onlyIDs or --short or --min?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I was going for something along the lines of 'docker images -q', but am not opposed to renaming the flag. Any preference?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I thought just --q would be good, but then remembered docker images uses --quiet or -q to only show the ids. Can I vote to change the flags to --omit for the column headings and --quiet for the image ids only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --quiet flag is what we already for headings in "list", that'll need to be changed there to keep them consistent. Updating.

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, couple nits for consideration

@nalind nalind changed the title Add "images" (listing) and "image-delete" commands Add "list-images" and "image-delete" commands Mar 23, 2017
@rhatdan
Copy link
Member

rhatdan commented Mar 24, 2017

I would prefer not to add additional verbs, just use buildah list and buildah delete.

@TomSweeneyRedHat
Copy link
Member

LGTM. For images docker uses 'images' for list and 'rmi' to remove. For containers 'ps' and 'rm'. Should we emulate that or do you think the code should recognize the object and do the right thing?

@nalind nalind changed the title Add "list-images" and "image-delete" commands Add "list-images" and "delete-image commands Mar 24, 2017
@nalind
Copy link
Member Author

nalind commented Mar 24, 2017

We can overload delete so that it looks for a container first, but with free-form names around, we're inevitably going to need some way to specify what type of thing was intended. We have distinctly different things to display for images and containers, and every output format I can come up with that encompasses both just looks messier if you only care about one or the other.

@rhatdan
Copy link
Member

rhatdan commented Mar 24, 2017

Can't we just force user to specify --image or --container when their is conflict.

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably b58b778) made this pull request unmergeable. Please resolve the merge conflicts.

Rename the "list" and "delete" commands to "containers" and "rm",
respectively, and add "images" and "rmi" counterparts for them.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@nalind nalind changed the title Add "list-images" and "delete-image commands Rename "list" and "delete" to "containers" and "rm", and add "images" and "rmi" commands Mar 28, 2017
@nalind nalind changed the title Rename "list" and "delete" to "containers" and "rm", and add "images" and "rmi" commands Rename "list" and "delete" to "containers" and "rm"; add "images" and "rmi" commands Mar 28, 2017
@rhatdan
Copy link
Member

rhatdan commented Mar 28, 2017

@rh-atomic-bot r+ 0e702d6

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit 0e702d6 with merge fc27a56...

@rh-atomic-bot
Copy link
Collaborator

☀️ Test successful - status-redhatci
Approved by: rhatdan
Pushing fc27a56 to master...

@nalind nalind deleted the images branch March 29, 2017 19:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants