docs: Fix template error in cli example

Signed-off-by: Max Morozov <max@morozov.page>
This commit is contained in:
Max Morozov 2022-08-03 22:27:27 +02:00 committed by Max Morozov
parent 5c511f4f85
commit 43c6db2468
No known key found for this signature in database
GPG Key ID: 9B2E0602AF665669
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ You can loop over arrays and maps in the results to produce simple text
output:
```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