Browse code

add -p PORT as a valid format specification

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Sven Dowideit authored on 2014/09/09 10:16:02
Showing 4 changed files
... ...
@@ -186,7 +186,7 @@ exposed ports, use **docker port**.
186 186
 
187 187
 **-p**, **--publish**=[]
188 188
    Publish a container's port to the host (format: ip:hostPort:containerPort |
189
-ip::containerPort | hostPort:containerPort) (use **docker port** to see the
189
+ip::containerPort | hostPort:containerPort | containerPort) (use **docker port** to see the
190 190
 actual mapping)
191 191
 
192 192
 **--privileged**=*true*|*false*
... ...
@@ -1010,7 +1010,7 @@ removed before the image is removed.
1010 1010
                                    'host': use the host network stack inside the container.  Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
1011 1011
       -P, --publish-all=false    Publish all exposed ports to the host interfaces
1012 1012
       -p, --publish=[]           Publish a container's port to the host
1013
-                                   format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort
1013
+                                   format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
1014 1014
                                    (use 'docker port' to see the actual mapping)
1015 1015
       --privileged=false         Give extended privileges to this container
1016 1016
       --restart=""               Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
... ...
@@ -345,7 +345,7 @@ or override the Dockerfile's exposed defaults:
345 345
     -P=false   : Publish all exposed ports to the host interfaces
346 346
     -p=[]      : Publish a container᾿s port to the host (format:
347 347
                  ip:hostPort:containerPort | ip::containerPort |
348
-                 hostPort:containerPort)
348
+                 hostPort:containerPort | containerPort)
349 349
                  (use 'docker port' to see the actual mapping)
350 350
     --link=""  : Add link to another container (name:alias)
351 351
 
... ...
@@ -14,7 +14,7 @@ import (
14 14
 
15 15
 const (
16 16
 	PortSpecTemplate       = "ip:hostPort:containerPort"
17
-	PortSpecTemplateFormat = "ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort"
17
+	PortSpecTemplateFormat = "ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort"
18 18
 )
19 19
 
20 20
 type PortBinding struct {