* Also touch up headings.
Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
(cherry picked from commit 17ae6539f6bfc20792d0a25b3f98adfce96e7337)
| ... | ... |
@@ -36,7 +36,7 @@ straightforward manner. |
| 36 | 36 |
|
| 37 | 37 |
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID
|
| 38 | 38 |
|
| 39 |
-**Get an instance's MAC Address:** |
|
| 39 |
+**Get an instance's MAC address:** |
|
| 40 | 40 |
|
| 41 | 41 |
For the most part, you can pick out any field from the JSON in a fairly |
| 42 | 42 |
straightforward manner. |
| ... | ... |
@@ -51,14 +51,14 @@ straightforward manner. |
| 51 | 51 |
|
| 52 | 52 |
$ docker inspect --format='{{.Container.Spec.Image}}' $INSTANCE_ID
|
| 53 | 53 |
|
| 54 |
-**List All Port Bindings:** |
|
| 54 |
+**List all port bindings:** |
|
| 55 | 55 |
|
| 56 | 56 |
One can loop over arrays and maps in the results to produce simple text |
| 57 | 57 |
output: |
| 58 | 58 |
|
| 59 | 59 |
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
|
| 60 | 60 |
|
| 61 |
-**Find a Specific Port Mapping:** |
|
| 61 |
+**Find a specific port mapping:** |
|
| 62 | 62 |
|
| 63 | 63 |
The `.Field` syntax doesn't work when the field name begins with a |
| 64 | 64 |
number, but the template language's `index` function does. The |