mirror of https://github.com/docker/cli.git
docs: Fix template error in cli example
Signed-off-by: Max Morozov <max@morozov.page>
This commit is contained in:
parent
5c511f4f85
commit
43c6db2468
|
@ -84,7 +84,7 @@ You can loop over arrays and maps in the results to produce simple text
|
||||||
output:
|
output:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
|
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{with $conf}}{{(index . 0).HostPort}}{{else}}none{{end}} {{end}}' $INSTANCE_ID
|
||||||
```
|
```
|
||||||
|
|
||||||
### Find a specific port mapping
|
### Find a specific port mapping
|
||||||
|
|
Loading…
Reference in New Issue