mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #8123 from dcro/docs-clarifications
Updated the documentation to to clarify random port mapping when using -...
This commit is contained in:
commit
60f6b0299a
2 changed files with 6 additions and 4 deletions
|
@ -186,8 +186,9 @@ and foreground Docker containers.
|
||||||
When set to true publish all exposed ports to the host interfaces. The
|
When set to true publish all exposed ports to the host interfaces. The
|
||||||
default is false. If the operator uses -P (or -p) then Docker will make the
|
default is false. If the operator uses -P (or -p) then Docker will make the
|
||||||
exposed port accessible on the host and the ports will be available to any
|
exposed port accessible on the host and the ports will be available to any
|
||||||
client that can reach the host. To find the map between the host ports and the
|
client that can reach the host. When using -P, Docker will bind the exposed
|
||||||
exposed ports, use **docker port**.
|
ports to a random port on the host between 49153 and 65535. To find the
|
||||||
|
mapping between the host ports and the exposed ports, use **docker port**.
|
||||||
|
|
||||||
**-p**, **--publish**=[]
|
**-p**, **--publish**=[]
|
||||||
Publish a container's port to the host (format: ip:hostPort:containerPort |
|
Publish a container's port to the host (format: ip:hostPort:containerPort |
|
||||||
|
|
|
@ -381,8 +381,9 @@ with `-P` or `-p,` or start the client container with `--link`.
|
||||||
|
|
||||||
If the operator uses `-P` or `-p` then Docker will make the exposed port
|
If the operator uses `-P` or `-p` then Docker will make the exposed port
|
||||||
accessible on the host and the ports will be available to any client
|
accessible on the host and the ports will be available to any client
|
||||||
that can reach the host. To find the map between the host ports and the
|
that can reach the host. When using `-P`, Docker will bind the exposed
|
||||||
exposed ports, use `docker port`)
|
ports to a random port on the host between 49153 and 65535. To find the
|
||||||
|
mapping between the host ports and the exposed ports, use `docker port`.
|
||||||
|
|
||||||
If the operator uses `--link` when starting the new client container,
|
If the operator uses `--link` when starting the new client container,
|
||||||
then the client container can access the exposed port via a private
|
then the client container can access the exposed port via a private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue