Merge pull request #7600 from tgogos/master

update networking.md
This commit is contained in:
L-Hudson 2019-01-03 09:48:30 -05:00 committed by GitHub
commit ae485c3f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -92,8 +92,7 @@ is an example of this.
$ docker run -d -p 80:80 --name webserver nginx
```
To clarify the syntax, the following two commands both expose port `80` on the
container to port `8000` on the host:
To clarify the syntax, the following two commands both publish container's port `80` to host's port `8000`:
```bash
$ docker run --publish 8000:80 --name webserver nginx
@ -101,8 +100,8 @@ $ docker run --publish 8000:80 --name webserver nginx
$ docker run -p 8000:80 --name webserver nginx
```
To expose all ports, use the `-P` flag. For example, the following command
starts a container (in detached mode) and the `-P` exposes all ports on the
To publish all ports, use the `-P` flag. For example, the following command
starts a container (in detached mode) and the `-P` flag publishes all exposed ports of the
container to random ports on the host.
```bash