From def6847e116a80d931aea16a57a1710e6f29dba2 Mon Sep 17 00:00:00 2001 From: Charles Chan Date: Sun, 12 Jun 2016 21:30:14 -0700 Subject: [PATCH] Update help output to match Docker 1.11. * Also touch up headings. Signed-off-by: Charles Chan --- docs/reference/commandline/inspect.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/commandline/inspect.md b/docs/reference/commandline/inspect.md index 7220d69f5c..34b60fbd46 100644 --- a/docs/reference/commandline/inspect.md +++ b/docs/reference/commandline/inspect.md @@ -36,7 +36,7 @@ straightforward manner. $ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID -**Get an instance's MAC Address:** +**Get an instance's MAC address:** For the most part, you can pick out any field from the JSON in a fairly straightforward manner. @@ -51,14 +51,14 @@ straightforward manner. $ docker inspect --format='{{.Container.Spec.Image}}' $INSTANCE_ID -**List All Port Bindings:** +**List all port bindings:** One can loop over arrays and maps in the results to produce simple text output: $ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID -**Find a Specific Port Mapping:** +**Find a specific port mapping:** The `.Field` syntax doesn't work when the field name begins with a number, but the template language's `index` function does. The