update networking.md

The use of "expose" here is misleading and should be replaced with "publish".
This commit is contained in:
Anastasios Gogos
2018-10-31 14:40:55 +02:00
committed by GitHub
parent 90af0bc8d5
commit 00a6a30f42

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