1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

improved doc and usage

This commit is contained in:
Victor Vieux 2013-05-22 16:15:52 +00:00
parent a3ccec197e
commit 800b401f0b
3 changed files with 17 additions and 2 deletions

View file

@ -53,7 +53,7 @@ func ParseCommands(host string, port int, 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{
"attach": "Attach to a running container",
"build": "Build a container from Dockerfile or via stdin",

View file

@ -14,7 +14,9 @@ To list available commands, either run ``docker`` with no parameters or execute
``docker help``::
$ 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.

View file

@ -33,6 +33,19 @@ Running an interactive shell
# allocate a tty, attach stdin and stdout
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
--------------------------------------