浏览代码

Merge pull request #2713 from eugenkrizo/patch-2

port published explicitly (for docker 0.6.6)
Andy Rothfusz 11 年之前
父节点
当前提交
92c3a319fb
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      docs/sources/examples/couchdb_data_volumes.rst

+ 4 - 4
docs/sources/examples/couchdb_data_volumes.rst

@@ -20,7 +20,7 @@ Note that we're marking ``/var/lib/couchdb`` as a data volume.
 
 
 .. code-block:: bash
 .. code-block:: bash
 
 
-    COUCH1=$(sudo docker run -d -v /var/lib/couchdb shykes/couchdb:2013-05-03)
+    COUCH1=$(sudo docker run -d -p 5984 -v /var/lib/couchdb shykes/couchdb:2013-05-03)
 
 
 Add data to the first database
 Add data to the first database
 ------------------------------
 ------------------------------
@@ -31,7 +31,7 @@ replace ``localhost`` with the public IP of your Docker host.
 .. code-block:: bash
 .. code-block:: bash
 
 
     HOST=localhost
     HOST=localhost
-    URL="http://$HOST:$(sudo docker port $COUCH1 5984)/_utils/"
+    URL="http://$HOST:$(sudo docker port $COUCH1 5984 | grep -Po '\d+$')/_utils/"
     echo "Navigate to $URL in your browser, and use the couch interface to add data"
     echo "Navigate to $URL in your browser, and use the couch interface to add data"
 
 
 Create second database
 Create second database
@@ -41,7 +41,7 @@ This time, we're requesting shared access to ``$COUCH1``'s volumes.
 
 
 .. code-block:: bash
 .. code-block:: bash
 
 
-    COUCH2=$(sudo docker run -d -volumes-from $COUCH1 shykes/couchdb:2013-05-03)
+    COUCH2=$(sudo docker run -d -p 5984 -volumes-from $COUCH1 shykes/couchdb:2013-05-03)
 
 
 Browse data on the second database
 Browse data on the second database
 ----------------------------------
 ----------------------------------
@@ -49,7 +49,7 @@ Browse data on the second database
 .. code-block:: bash
 .. code-block:: bash
 
 
     HOST=localhost
     HOST=localhost
-    URL="http://$HOST:$(sudo docker port $COUCH2 5984)/_utils/"
+    URL="http://$HOST:$(sudo docker port $COUCH2 5984 | grep -Po '\d+$')/_utils/"
     echo "Navigate to $URL in your browser. You should see the same data as in the first database"'!'
     echo "Navigate to $URL in your browser. You should see the same data as in the first database"'!'
 
 
 Congratulations, you are now running two Couchdb containers, completely
 Congratulations, you are now running two Couchdb containers, completely