mirror of https://github.com/docker/docs.git
improved doc and usage
This commit is contained in:
parent
a3ccec197e
commit
800b401f0b
|
@ -53,7 +53,7 @@ func ParseCommands(host string, port int, args ...string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *DockerCli) CmdHelp(args ...string) error {
|
func (cli *DockerCli) CmdHelp(args ...string) error {
|
||||||
help := "Usage: docker COMMAND [arg...]\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n"
|
help := "Usage: docker [OPTIONS] COMMAND [arg...]\n -host=\"0.0.0.0\": Host to bind/connect to\n -port=4243: Port to listen/connect to\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n"
|
||||||
for cmd, description := range map[string]string{
|
for cmd, description := range map[string]string{
|
||||||
"attach": "Attach to a running container",
|
"attach": "Attach to a running container",
|
||||||
"build": "Build a container from Dockerfile or via stdin",
|
"build": "Build a container from Dockerfile or via stdin",
|
||||||
|
|
|
@ -14,7 +14,9 @@ To list available commands, either run ``docker`` with no parameters or execute
|
||||||
``docker help``::
|
``docker help``::
|
||||||
|
|
||||||
$ docker
|
$ docker
|
||||||
Usage: docker COMMAND [arg...]
|
Usage: docker [OPTIONS] COMMAND [arg...]
|
||||||
|
-host="0.0.0.0": Host to bind/connect to
|
||||||
|
-port=4243: Port to listen/connect to
|
||||||
|
|
||||||
A self-sufficient runtime for linux containers.
|
A self-sufficient runtime for linux containers.
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,19 @@ 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
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
If you want Docker to listen to another port and bind to another ip
|
||||||
|
use -host and -port on both deamon and client
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Run docker in daemon mode
|
||||||
|
sudo <path to>/docker -host 127.0.0.1 -port 5555 &
|
||||||
|
# Download a base image
|
||||||
|
docker -port 5555 pull base
|
||||||
|
|
||||||
|
|
||||||
Starting a long-running worker process
|
Starting a long-running worker process
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue