From df1621914b56b4ed20f684363247a9bb0c7acebf Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Thu, 31 Oct 2013 01:08:16 -0400 Subject: [PATCH] correct assignment of $PORT from docker port output in the example, PORT is assigned to "0.0.0.0:" vs "" as in previous versions of docker (I encountered this documentation discrepancy tonight after installing docker v0.6.5) --- docs/sources/use/basics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/use/basics.rst b/docs/sources/use/basics.rst index edec214a7f..a9eda88a63 100644 --- a/docs/sources/use/basics.rst +++ b/docs/sources/use/basics.rst @@ -147,7 +147,7 @@ Expose a service on a TCP port JOB=$(sudo docker run -d -p 4444 ubuntu:12.10 /bin/nc -l 4444) # Which public port is NATed to my container? - PORT=$(sudo docker port $JOB 4444) + PORT=$(sudo docker port $JOB 4444 | awk -F: '{ print $2 }') # Connect to the public port via the host's public address # Please note that because of how routing works connecting to localhost or 127.0.0.1 $PORT will not work.