Browse code

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

Signed-off-by: Dan Cotora <d@bluevision.ro>

Dan Cotora authored on 2014/09/22 14:36:20
Showing 2 changed files
... ...
@@ -186,8 +186,9 @@ and foreground Docker containers.
186 186
    When set to true publish all exposed ports to the host interfaces. The
187 187
 default is false. If the operator uses -P (or -p) then Docker will make the
188 188
 exposed port accessible on the host and the ports will be available to any
189
-client that can reach the host. To find the map between the host ports and the
190
-exposed ports, use **docker port**.
189
+client that can reach the host. When using -P, Docker will bind the exposed 
190
+ports to a random port on the host between 49153 and 65535. To find the 
191
+mapping between the host ports and the exposed ports, use **docker port**.
191 192
 
192 193
 **-p**, **--publish**=[]
193 194
    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`.
381 381
 
382 382
 If the operator uses `-P` or `-p` then Docker will make the exposed port
383 383
 accessible on the host and the ports will be available to any client
384
-that can reach the host. To find the map between the host ports and the
385
-exposed ports, use `docker port`)
384
+that can reach the host. When using `-P`, Docker will bind the exposed 
385
+ports to a random port on the host between 49153 and 65535. To find the
386
+mapping between the host ports and the exposed ports, use `docker port`.
386 387
 
387 388
 If the operator uses `--link` when starting the new client container,
388 389
 then the client container can access the exposed port via a private