mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
add some common examples for docker images, and tell the user what -a filters out
This commit is contained in:
parent
51576069ad
commit
152459b727
2 changed files with 40 additions and 6 deletions
|
@ -1073,7 +1073,7 @@ func (cli *DockerCli) CmdPull(args ...string) error {
|
||||||
func (cli *DockerCli) CmdImages(args ...string) error {
|
func (cli *DockerCli) CmdImages(args ...string) error {
|
||||||
cmd := Subcmd("images", "[OPTIONS] [NAME]", "List images")
|
cmd := Subcmd("images", "[OPTIONS] [NAME]", "List images")
|
||||||
quiet := cmd.Bool("q", false, "only show numeric IDs")
|
quiet := cmd.Bool("q", false, "only show numeric IDs")
|
||||||
all := cmd.Bool("a", false, "show all images")
|
all := cmd.Bool("a", false, "show all images (by default filter out the intermediate images used to build)")
|
||||||
noTrunc := cmd.Bool("notrunc", false, "Don't truncate output")
|
noTrunc := cmd.Bool("notrunc", false, "Don't truncate output")
|
||||||
flViz := cmd.Bool("viz", false, "output graph in graphviz format")
|
flViz := cmd.Bool("viz", false, "output graph in graphviz format")
|
||||||
flTree := cmd.Bool("tree", false, "output graph in tree format")
|
flTree := cmd.Bool("tree", false, "output graph in tree format")
|
||||||
|
|
|
@ -334,18 +334,52 @@ Show events in the past from a specified time
|
||||||
|
|
||||||
List images
|
List images
|
||||||
|
|
||||||
-a=false: show all images
|
-a=false: show all images (by default filter out the intermediate images used to build)
|
||||||
-notrunc=false: Don't truncate output
|
-notrunc=false: Don't truncate output
|
||||||
-q=false: only show numeric IDs
|
-q=false: only show numeric IDs
|
||||||
-tree=false: output graph in tree format
|
-tree=false: output graph in tree format
|
||||||
-viz=false: output graph in graphviz format
|
-viz=false: output graph in graphviz format
|
||||||
|
|
||||||
|
Listing the most recently created images
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ sudo docker images | head
|
||||||
|
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||||
|
<none> <none> 77af4d6b9913 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
committest latest b6fa739cedf5 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 78a85c484f71 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
docker latest 30557a29d5ab 20 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 0124422dd9f9 20 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 18ad6fad3402 22 hours ago 23.68 MB (virtual 1.082 GB)
|
||||||
|
<none> <none> f9f1e26352f0 23 hours ago 30.46 MB (virtual 1.089 GB)
|
||||||
|
tryout latest 2629d1fa0b81 23 hours ago 16.4 kB (virtual 131.5 MB)
|
||||||
|
<none> <none> 5ed6274db6ce 24 hours ago 30.44 MB (virtual 1.089 GB)
|
||||||
|
|
||||||
|
Listing the full length image IDs
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ sudo docker images -notrunc | head
|
||||||
|
REPOSITORY TAG IMAGE ID CREATED SIZE
|
||||||
|
<none> <none> 77af4d6b9913e693e8d0b4b294fa62ade6054e6b2f1ffb617ac955dd63fb0182 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
committest latest b6fa739cedf5ea12a620a439402b6004d057da800f91c7524b5086a5e4749c9f 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 78a85c484f71509adeaace20e72e941f6bdd2b25b4c75da8693efd9f61a37921 19 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
docker latest 30557a29d5abc51e5f1d5b472e79b7e296f595abcf19fe6b9199dbbc809c6ff4 20 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 0124422dd9f9cf7ef15c0617cda3931ee68346455441d66ab8bdc5b05e9fdce5 20 hours ago 30.53 MB (virtual 1.089 GB)
|
||||||
|
<none> <none> 18ad6fad340262ac2a636efd98a6d1f0ea775ae3d45240d3418466495a19a81b 22 hours ago 23.68 MB (virtual 1.082 GB)
|
||||||
|
<none> <none> f9f1e26352f0a3ba6a0ff68167559f64f3e21ff7ada60366e2d44a04befd1d3a 23 hours ago 30.46 MB (virtual 1.089 GB)
|
||||||
|
tryout latest 2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074 23 hours ago 16.4 kB (virtual 131.5 MB)
|
||||||
|
<none> <none> 5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df 24 hours ago 30.44 MB (virtual 1.089 GB)
|
||||||
|
|
||||||
Displaying images visually
|
Displaying images visually
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
::
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo docker images -viz | dot -Tpng -o docker.png
|
$ sudo docker images -viz | dot -Tpng -o docker.png
|
||||||
|
|
||||||
.. image:: docker_images.gif
|
.. image:: docker_images.gif
|
||||||
:alt: Example inheritance graph of Docker images.
|
:alt: Example inheritance graph of Docker images.
|
||||||
|
@ -354,9 +388,9 @@ Displaying images visually
|
||||||
Displaying image hierarchy
|
Displaying image hierarchy
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
::
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo docker images -tree
|
$ sudo docker images -tree
|
||||||
|
|
||||||
|─8dbd9e392a96 Size: 131.5 MB (virtual 131.5 MB) Tags: ubuntu:12.04,ubuntu:latest,ubuntu:precise
|
|─8dbd9e392a96 Size: 131.5 MB (virtual 131.5 MB) Tags: ubuntu:12.04,ubuntu:latest,ubuntu:precise
|
||||||
└─27cf78414709 Size: 180.1 MB (virtual 180.1 MB)
|
└─27cf78414709 Size: 180.1 MB (virtual 180.1 MB)
|
||||||
|
|
Loading…
Reference in a new issue