This commit is contained in:
Victor Vieux 2013-06-19 12:48:50 +00:00
Родитель 9632bf2287
Коммит 063c838c92
3 изменённых файлов: 21 добавлений и 5 удалений

Просмотреть файл

@ -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. 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

Просмотреть файл

@ -15,7 +15,7 @@ To list available commands, either run ``docker`` with no parameters or execute
$ docker $ docker
Usage: docker [OPTIONS] COMMAND [arg...] 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. A self-sufficient runtime for linux containers.

Просмотреть файл

@ -33,11 +33,16 @@ Running an interactive shell
# allocate a tty, attach stdin and stdout # allocate a tty, attach stdin and stdout
docker run -i -t base /bin/bash 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 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 .. code-block:: bash
@ -46,6 +51,17 @@ use -host and -port on both deamon and client
# Download a base image # Download a base image
docker -H :5555 pull base 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 Starting a long-running worker process
-------------------------------------- --------------------------------------