зеркало из https://github.com/microsoft/docker.git
update docs
This commit is contained in:
Родитель
9632bf2287
Коммит
063c838c92
|
@ -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
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
--------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче