Add documentation for docker stats --format#26892
Add documentation for docker stats --format#26892thaJeztah merged 1 commit intomoby:masterfrom boaz0:stats_format_docs
Conversation
vdemeester
left a comment
There was a problem hiding this comment.
Small nit, but LGTM 🐸
/cc @thaJeztah
There was a problem hiding this comment.
Only available on Linux maybe ?
thaJeztah
left a comment
There was a problem hiding this comment.
Thanks @ripcurld00d! I left some comments. Also, can you update the man-page with the same changes? https://github.com/docker/docker/blob/master/man/docker-stats.1.md
There was a problem hiding this comment.
s/will pretty print/pretty prints/
There was a problem hiding this comment.
Minor nit: can you make the | align here (and for the heading)? Makes it slightly more readable when looking at the Markdown source
There was a problem hiding this comment.
Trying to remove future tense;
When using the `--format` option, the `stats` command either
outputs the data exactly as the template declares or, when using the
`table` directive, includes column headers as well.There was a problem hiding this comment.
Can you add a bash language-hint, and add a space between the "command" and the "output"? We've seen that that makes it a bit clearer what the output is, and what the actually command is. Also looks like the output of your example is missing the colon; So;
```bash
$ docker stats --format "{{.Container}}: {{.CPUPerc}}"
09d3bb5b1604: 6.61%
9db7aa4d986d: 9.19%
3f214c61ad1d: 0.00%
```
There was a problem hiding this comment.
This is > 80-chars, please wrap;
To list all containers statistics with their name, CPU percentage and memory
usage in a table format you can use:There was a problem hiding this comment.
Can you do the same here? (Bash-hint, and space between command and output)
|
@thaJeztah @vdemeester thanks a lot! |
Signed-off-by: Boaz Shuster <[email protected]>
|
@thaJeztah OK, I added |
|
@thaJeztah the pleasure is all mine! I like Docker a lot and giving back to the community is the least that I can do. |
- What I did
Used the
Formattingsection in the images command line documentation as an exampleThis closes #26779
- How I did it
Add description in the stats command line documentation