瀏覽代碼

Doc update to clarify random port mapping on docker run -P

Signed-off-by: Dan Cotora <d@bluevision.ro>
Dan Cotora 10 年之前
父節點
當前提交
a8775d2f9a
共有 2 個文件被更改,包括 6 次插入4 次删除
  1. 3 2
      docs/man/docker-run.1.md
  2. 3 2
      docs/sources/reference/run.md

+ 3 - 2
docs/man/docker-run.1.md

@@ -186,8 +186,9 @@ and foreground Docker containers.
    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
 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
-exposed ports, use **docker port**.
+client that can reach the host. When using -P, Docker will bind the exposed 
+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**=[]
    Publish a container's port to the host (format: ip:hostPort:containerPort |

+ 3 - 2
docs/sources/reference/run.md

@@ -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
 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
-exposed ports, use `docker port`)
+that can reach the host. When using `-P`, Docker will bind the exposed 
+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,
 then the client container can access the exposed port via a private