浏览代码

update docs

Victor Vieux 12 年之前
父节点
当前提交
063c838c92
共有 3 个文件被更改,包括 21 次插入5 次删除
  1. 1 1
      docs/sources/api/docker_remote_api_v1.2.rst
  2. 1 1
      docs/sources/commandline/cli.rst
  3. 19 3
      docs/sources/use/basics.rst

+ 1 - 1
docs/sources/api/docker_remote_api_v1.2.rst

@@ -1026,5 +1026,5 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
 
 To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
     
-    docker -d -H="192.168.1.9:4243" -api-enable-cors
+    docker -d -H="tcp://192.168.1.9:4243" -api-enable-cors
 

+ 1 - 1
docs/sources/commandline/cli.rst

@@ -15,7 +15,7 @@ To list available commands, either run ``docker`` with no parameters or execute
 
   $ docker
     Usage: docker [OPTIONS] COMMAND [arg...]
-      -H="127.0.0.1:4243": Host:port to bind/connect to
+      -H=[tcp://127.0.0.1:4243]: tcp://host:port to bind/connect to or unix://path/to/socket to use
 
     A self-sufficient runtime for linux containers.
 

+ 19 - 3
docs/sources/use/basics.rst

@@ -33,11 +33,16 @@ Running an interactive shell
   # allocate a tty, attach stdin and stdout
   docker run -i -t base /bin/bash
 
-Bind Docker to another host/port
---------------------------------
+Bind Docker to another host/port or a unix socket
+-------------------------------------------------
 
 If you want Docker to listen to another port and bind to another ip
-use -host and -port on both deamon and client
+use -H on both deamon and client.
+-H could be (if no sheme, tcp is assumed):
+* tcp://host -> tcp connection on host:4243
+* tcp://host:port -> tcp connection on host:port
+* tcp://:port -> tcp connection on 127.0.0.1:port
+* unix://path/to/socket -> unix socket located at path/to/socket
 
 .. code-block:: bash
 
@@ -46,6 +51,17 @@ use -host and -port on both deamon and client
    # Download a base image
    docker -H :5555 pull base
 
+You can use multiple -H, for exemple, if you want to listen
+on both tcp and a unix socket
+
+.. code-block:: bash
+
+   # Run docker in daemon mode
+   sudo <path to>/docker -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock
+   # Download a base image
+   docker pull base
+   # OR
+   docker -H unix:///var/run/docker.sock pull base
 
 Starting a long-running worker process
 --------------------------------------