Browse code

Deprecate 'docker images --tree' and 'docker images --viz'

* The commands are no longer listed or documented.
* The commands still work but print a deprecation warning.
* The commands should be removed in a future version.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)

Solomon Hykes authored on 2014/04/04 07:02:03
Showing 2 changed files
... ...
@@ -1137,8 +1137,9 @@ func (cli *DockerCli) CmdImages(args ...string) error {
1137 1137
 	quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only show numeric IDs")
1138 1138
 	all := cmd.Bool([]string{"a", "-all"}, false, "Show all images (by default filter out the intermediate images used to build)")
1139 1139
 	noTrunc := cmd.Bool([]string{"#notrunc", "-no-trunc"}, false, "Don't truncate output")
1140
-	flViz := cmd.Bool([]string{"v", "#viz", "-viz"}, false, "Output graph in graphviz format")
1141
-	flTree := cmd.Bool([]string{"t", "#tree", "-tree"}, false, "Output graph in tree format")
1140
+	// FIXME: --viz and --tree are deprecated. Remove them in a future version.
1141
+	flViz := cmd.Bool([]string{"#v", "#viz", "#-viz"}, false, "Output graph in graphviz format")
1142
+	flTree := cmd.Bool([]string{"#t", "#tree", "#-tree"}, false, "Output graph in tree format")
1142 1143
 
1143 1144
 	if err := cmd.Parse(args); err != nil {
1144 1145
 		return nil
... ...
@@ -1150,6 +1151,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
1150 1150
 
1151 1151
 	filter := cmd.Arg(0)
1152 1152
 
1153
+	// FIXME: --viz and --tree are deprecated. Remove them in a future version.
1153 1154
 	if *flViz || *flTree {
1154 1155
 		body, _, err := readBody(cli.call("GET", "/images/json?all=1", nil, false))
1155 1156
 		if err != nil {
... ...
@@ -1260,6 +1262,7 @@ func (cli *DockerCli) CmdImages(args ...string) error {
1260 1260
 	return nil
1261 1261
 }
1262 1262
 
1263
+// FIXME: --viz and --tree are deprecated. Remove them in a future version.
1263 1264
 func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[string]*engine.Table, prefix string, printNode func(cli *DockerCli, noTrunc bool, image *engine.Env, prefix string)) {
1264 1265
 	length := images.Len()
1265 1266
 	if length > 1 {
... ...
@@ -1286,6 +1289,7 @@ func (cli *DockerCli) WalkTree(noTrunc bool, images *engine.Table, byParent map[
1286 1286
 	}
1287 1287
 }
1288 1288
 
1289
+// FIXME: --viz and --tree are deprecated. Remove them in a future version.
1289 1290
 func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix string) {
1290 1291
 	var (
1291 1292
 		imageID  string
... ...
@@ -1309,6 +1313,7 @@ func (cli *DockerCli) printVizNode(noTrunc bool, image *engine.Env, prefix strin
1309 1309
 	}
1310 1310
 }
1311 1311
 
1312
+// FIXME: --viz and --tree are deprecated. Remove them in a future version.
1312 1313
 func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix string) {
1313 1314
 	var imageID string
1314 1315
 	if noTrunc {
... ...
@@ -600,8 +600,6 @@ To see how the ``docker:latest`` image was built:
600 600
       -a, --all=false: Show all images (by default filter out the intermediate images used to build)
601 601
       --no-trunc=false: Don't truncate output
602 602
       -q, --quiet=false: Only show numeric IDs
603
-      -t, --tree=false: Output graph in tree format
604
-      -v, --viz=false: Output graph in graphviz format
605 603
 
606 604
 Listing the most recently created images
607 605
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
... ...
@@ -637,46 +635,6 @@ Listing the full length image IDs
637 637
 	tryout                        latest              2629d1fa0b81b222fca63371ca16cbf6a0772d07759ff80e8d1369b926940074   23 hours ago        131.5 MB
638 638
 	<none>                        <none>              5ed6274db6ceb2397844896966ea239290555e74ef307030ebb01ff91b1914df   24 hours ago        1.089 GB
639 639
 
640
-Displaying images visually
641
-~~~~~~~~~~~~~~~~~~~~~~~~~~
642
-
643
-.. code-block:: bash
644
-
645
-    $ sudo docker images --viz | dot -Tpng -o docker.png
646
-
647
-.. image:: docker_images.gif
648
-   :alt: Example inheritance graph of Docker images.
649
-
650
-
651
-Displaying image hierarchy
652
-~~~~~~~~~~~~~~~~~~~~~~~~~~
653
-
654
-.. code-block:: bash
655
-
656
-    $ sudo docker images --tree
657
-
658
-    ├─8dbd9e392a96 Size: 131.5 MB (virtual 131.5 MB) Tags: ubuntu:12.04,ubuntu:latest,ubuntu:precise
659
-    └─27cf78414709 Size: 180.1 MB (virtual 180.1 MB)
660
-      └─b750fe79269d Size: 24.65 kB (virtual 180.1 MB) Tags: ubuntu:12.10,ubuntu:quantal
661
-        ├─f98de3b610d5 Size: 12.29 kB (virtual 180.1 MB)
662
-        │ └─7da80deb7dbf Size: 16.38 kB (virtual 180.1 MB)
663
-        │   └─65ed2fee0a34 Size: 20.66 kB (virtual 180.2 MB)
664
-        │     └─a2b9ea53dddc Size: 819.7 MB (virtual 999.8 MB)
665
-        │       └─a29b932eaba8 Size: 28.67 kB (virtual 999.9 MB)
666
-        │         └─e270a44f124d Size: 12.29 kB (virtual 999.9 MB) Tags: progrium/buildstep:latest
667
-        └─17e74ac162d8 Size: 53.93 kB (virtual 180.2 MB)
668
-          └─339a3f56b760 Size: 24.65 kB (virtual 180.2 MB)
669
-            └─904fcc40e34d Size: 96.7 MB (virtual 276.9 MB)
670
-              └─b1b0235328dd Size: 363.3 MB (virtual 640.2 MB)
671
-                └─7cb05d1acb3b Size: 20.48 kB (virtual 640.2 MB)
672
-                  └─47bf6f34832d Size: 20.48 kB (virtual 640.2 MB)
673
-                    └─f165104e82ed Size: 12.29 kB (virtual 640.2 MB)
674
-                      └─d9cf85a47b7e Size: 1.911 MB (virtual 642.2 MB)
675
-                        └─3ee562df86ca Size: 17.07 kB (virtual 642.2 MB)
676
-                          └─b05fc2d00e4a Size: 24.96 kB (virtual 642.2 MB)
677
-                            └─c96a99614930 Size: 12.29 kB (virtual 642.2 MB)
678
-                              └─a6a357a48c49 Size: 12.29 kB (virtual 642.2 MB) Tags: ndj/mongodb:latest
679
-
680 640
 .. _cli_import:
681 641
 
682 642
 ``import``