Conversation
|
Hm, I like the awesomeness, but I'm -1 on having the I would not mind these options if the flag had a different name (e.g. Again, I do like the awesomeness and greatly appreciate the work on this! |
|
I'm just kind of wondering how we went from "why would we need to reorder/add columns, let them just use the API' to this uber-customizable feature? Not saying I'm against it, but if people were hesitant around just choosing which column to show, I would expect them to be even more concerned about a flag that allowed you to do |
|
I'd like to better understand the usecases for this. I understood the original complaints: text too wide; can't awk it easily; want to choose which columns to show. But right now this feels more like extra coolness w/o a clear customer request/requirement/pain-point that we're trying to solve. But, as I mention in the other thread, no matter which way we go I would want to expand it to other tabular commands, like images and search, for consistency. |
|
@calavera we would love to see this feature in docker, for swarm |
|
@duglin There are now container labels. Image this use case: This is very helpful especially when you start having more than just a few containers. It becomes even more useful if you can specify the formatting through an environment variable, just like your shell prompt. |
|
@calavera Is "renaming" supported? Couldn't quite figure that out by looking over the code quickly. Since by design labels are supposed to be FQDN, they can get pretty nasty (e.g. I'd like to display the |
|
@aluzzardi that can be supported. Right now, it takes the label name splitting the FQDN, for example |
Signed-off-by: David Calavera <[email protected]>
|
lets move the discussion back to #10255 as the original author expressed desire to finish the PR with additional guidance from maintainers. |
This is a generalization of #11943 and #10255 to allow awesome custom formatting!
It follows Docker convention to expose a go template to allow formatting. The default table format for
docker pscan be expressed as:This also allows to display all the labels for a container with
{{.Labels}}or a specific label with{{(.Label "com.docker.cpu")}}TODO:
Signed-off-by: David Calavera [email protected]