mirror of https://github.com/docker/cli.git
Merge pull request #2309 from Abreto/Abreto-patch-1
Fix a typo and enhance a script in an example
This commit is contained in:
commit
d104cfefe5
|
@ -690,7 +690,7 @@ using IPv4 or IPv6 networking in your containers. Use the following
|
||||||
flags for IPv4 address retrieval for a network device named `eth0`:
|
flags for IPv4 address retrieval for a network device named `eth0`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print \$2}' | cut -d / -f 1`
|
$ HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print $2}' | cut -d / -f 1 | sed -n 1p`
|
||||||
$ docker run --add-host=docker:${HOSTIP} --rm -it debian
|
$ docker run --add-host=docker:${HOSTIP} --rm -it debian
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue