Documentation: Remove reference to PUBLISH Dockerfile directive in networking docs (#4863)

This commit is contained in:
Matt Hoyle 2017-10-10 20:57:29 +00:00 committed by Misty Stanley-Jones
parent 4c4b9bdc06
commit ae4d35c5fe
1 changed files with 7 additions and 7 deletions

View File

@ -525,16 +525,16 @@ network and user-defined bridge networks.
- You expose ports using the `EXPOSE` keyword in the Dockerfile or the - You expose ports using the `EXPOSE` keyword in the Dockerfile or the
`--expose` flag to `docker run`. Exposing ports is a way of documenting which `--expose` flag to `docker run`. Exposing ports is a way of documenting which
ports are used, but does not actually map or open any ports. Exposing ports ports are used, but **does not actually map or open any ports**. Exposing ports
is optional. is optional.
- You publish ports using the `PUBLISH` keyword in the Dockerfile or the - You publish ports using the `--publish` or `--publish-all` flag to `docker run`.
`--publish` flag to `docker run`. This tells Docker which ports to open on the This tells Docker which ports to open on the container's network interface.
container's network interface. When a port is published, it is mapped to an When a port is published, it is mapped to an
available high-order port (higher than `30000`) on the host machine, unless available high-order port (higher than `30000`) on the host machine, unless
you specify the port to map to on the host machine at runtime. You cannot you specify the port to map to on the host machine at runtime. You cannot
specify the port to map to on the host machine in the Dockerfile, because specify the port to map to on the host machine when you build the image (in the
there is no way to guarantee that the port will be available on the host Dockerfile), because there is no way to guarantee that the port will be available
machine where you run the image. on the host machine where you run the image.
This example publishes port 80 in the container to a random high This example publishes port 80 in the container to a random high
port (in this case, `32768`) on the host machine. The `-d` flag causes the port (in this case, `32768`) on the host machine. The `-d` flag causes the