diff --git a/docs/reference/builder.md b/docs/reference/builder.md index f022d51d1f..4a1050a866 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -484,17 +484,15 @@ To view an image's labels, use the `docker inspect` command. EXPOSE [...] -The `EXPOSE` instructions informs Docker that the container will listen on the -specified network ports at runtime. Docker uses this information to interconnect -containers using links (see the [Docker User -Guide](../userguide/dockerlinks.md) and to determine which ports to expose to the -host when [using the -P flag](run.md#expose-incoming-ports). - -> **Note**: -> `EXPOSE` doesn't define which ports can be exposed to the host or make ports -> accessible from the host by default. To expose ports to the host, at runtime, -> [use the `-p` flag](../userguide/dockerlinks.md) or -> [the -P flag](run.md#expose-incoming-ports). +The `EXPOSE` instruction informs Docker that the container listens on the +specified network ports at runtime. `EXPOSE` does not make the ports of the +container accessible to the host. To do that, you must use either the `-p` flag +to publish a range of ports or the `-P` flag to publish all of the exposed ports. +You can expose one port number and publish it externally under another number. + +Docker uses exposed and published ports to interconnect containers using links +(see [Linking containers together](../userguide/dockerlinks.md)) +and to set up port redirection on the host system when [using the -P flag](run.md#expose-incoming-ports). ## ENV diff --git a/man/Dockerfile.5.md b/man/Dockerfile.5.md index 528fb67522..c5e5bea518 100644 --- a/man/Dockerfile.5.md +++ b/man/Dockerfile.5.md @@ -185,7 +185,7 @@ A Dockerfile is similar to a Makefile. -- `EXPOSE [...]` The **EXPOSE** instruction informs Docker that the container listens on the specified network ports at runtime. Docker uses this information to - interconnect containers using links, and to set up port redirection on the host + interconnect containers using links and to set up port redirection on the host system. **ENV** diff --git a/man/docker-run.1.md b/man/docker-run.1.md index bb7c38e01a..443933457f 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -223,7 +223,10 @@ ENTRYPOINT. Read in a line delimited file of environment variables **--expose**=[] - Expose a port, or a range of ports (e.g. --expose=3300-3310), from the container without publishing it to your host + Expose a port, or a range of ports (e.g. --expose=3300-3310) informs Docker +that the container listens on the specified network ports at runtime. Docker +uses this information to interconnect containers using links and to set up port +redirection on the host system. **--group-add**=[] Add additional groups to run as