updating docs for EXPOSE option on run command; fixes #16634

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown 2015-10-12 16:59:25 -05:00
Родитель 96965e2abd
Коммит d955fdb9ac
3 изменённых файлов: 14 добавлений и 13 удалений

Просмотреть файл

@ -484,17 +484,15 @@ To view an image's labels, use the `docker inspect` command.
EXPOSE <port> [<port>...]
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

Просмотреть файл

@ -185,7 +185,7 @@ A Dockerfile is similar to a Makefile.
-- `EXPOSE <port> [<port>...]`
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**

Просмотреть файл

@ -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