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

Unify docker commands' usage in man and help

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
This commit is contained in:
Ma Shimiao 2015-06-09 21:33:41 +08:00
parent 98f988f62c
commit f38232b475
10 changed files with 26 additions and 25 deletions

View file

@ -16,7 +16,7 @@ import (
// //
// Usage: docker cp CONTAINER:PATH HOSTDIR // Usage: docker cp CONTAINER:PATH HOSTDIR
func (cli *DockerCli) CmdCp(args ...string) error { func (cli *DockerCli) CmdCp(args ...string) error {
cmd := cli.Subcmd("cp", []string{"CONTAINER:PATH HOSTDIR|-"}, "Copy files/folders from a PATH on the container to a HOSTDIR on the host\nrunning the command. Use '-' to write the data as a tar file to STDOUT.", true) cmd := cli.Subcmd("cp", []string{"CONTAINER:PATH HOSTDIR|-"}, "Copy files/folders from a container's PATH to a HOSTDIR on the host\nrunning the command. Use '-' to write the data as a tar file to STDOUT.", true)
cmd.Require(flag.Exact, 2) cmd.Require(flag.Exact, 2)
cmd.ParseFlags(args, true) cmd.ParseFlags(args, true)

View file

@ -14,7 +14,7 @@ import (
// //
// Usage: docker export [OPTIONS] CONTAINER // Usage: docker export [OPTIONS] CONTAINER
func (cli *DockerCli) CmdExport(args ...string) error { func (cli *DockerCli) CmdExport(args ...string) error {
cmd := cli.Subcmd("export", []string{"CONTAINER"}, "Export a filesystem as a tar archive (streamed to STDOUT by default)", true) cmd := cli.Subcmd("export", []string{"CONTAINER"}, "Export the contents of a container's filesystem as a tar archive", true)
outfile := cmd.String([]string{"o", "-output"}, "", "Write to a file, instead of STDOUT") outfile := cmd.String([]string{"o", "-output"}, "", "Write to a file, instead of STDOUT")
cmd.Require(flag.Exact, 1) cmd.Require(flag.Exact, 1)

View file

@ -15,7 +15,7 @@ import (
// //
// Usage: docker pull [OPTIONS] IMAGENAME[:TAG|@DIGEST] // Usage: docker pull [OPTIONS] IMAGENAME[:TAG|@DIGEST]
func (cli *DockerCli) CmdPull(args ...string) error { func (cli *DockerCli) CmdPull(args ...string) error {
cmd := cli.Subcmd("pull", []string{"NAME[:TAG|@DIGEST]"}, "Pull an image or a repository from the registry", true) cmd := cli.Subcmd("pull", []string{"NAME[:TAG|@DIGEST]"}, "Pull an image or a repository from a registry", true)
allTags := cmd.Bool([]string{"a", "-all-tags"}, false, "Download all tagged images in the repository") allTags := cmd.Bool([]string{"a", "-all-tags"}, false, "Download all tagged images in the repository")
cmd.Require(flag.Exact, 1) cmd.Require(flag.Exact, 1)

View file

@ -13,7 +13,7 @@ import (
// //
// Usage: docker push NAME[:TAG] // Usage: docker push NAME[:TAG]
func (cli *DockerCli) CmdPush(args ...string) error { func (cli *DockerCli) CmdPush(args ...string) error {
cmd := cli.Subcmd("push", []string{"NAME[:TAG]"}, "Push an image or a repository to the registry", true) cmd := cli.Subcmd("push", []string{"NAME[:TAG]"}, "Push an image or a repository to a registry", true)
cmd.Require(flag.Exact, 1) cmd.Require(flag.Exact, 1)
cmd.ParseFlags(args, true) cmd.ParseFlags(args, true)

View file

@ -32,40 +32,40 @@ var (
{"attach", "Attach to a running container"}, {"attach", "Attach to a running container"},
{"build", "Build an image from a Dockerfile"}, {"build", "Build an image from a Dockerfile"},
{"commit", "Create a new image from a container's changes"}, {"commit", "Create a new image from a container's changes"},
{"cp", "Copy files/folders from a container's filesystem to the host path"}, {"cp", "Copy files/folders from a container to a HOSTDIR or to STDOUT"},
{"create", "Create a new container"}, {"create", "Create a new container"},
{"diff", "Inspect changes on a container's filesystem"}, {"diff", "Inspect changes on a container's filesystem"},
{"events", "Get real time events from the server"}, {"events", "Get real time events from the server"},
{"exec", "Run a command in a running container"}, {"exec", "Run a command in a running container"},
{"export", "Stream the contents of a container as a tar archive"}, {"export", "Export a container's filesystem as a tar archive"},
{"history", "Show the history of an image"}, {"history", "Show the history of an image"},
{"images", "List images"}, {"images", "List images"},
{"import", "Create a new filesystem image from the contents of a tarball"}, {"import", "Import the contents from a tarball to create a filesystem image"},
{"info", "Display system-wide information"}, {"info", "Display system-wide information"},
{"inspect", "Return low-level information on a container or image"}, {"inspect", "Return low-level information on a container or image"},
{"kill", "Kill a running container"}, {"kill", "Kill a running container"},
{"load", "Load an image from a tar archive"}, {"load", "Load an image from a tar archive or STDIN"},
{"login", "Register or log in to a Docker registry server"}, {"login", "Register or log in to a Docker registry"},
{"logout", "Log out from a Docker registry server"}, {"logout", "Log out from a Docker registry"},
{"logs", "Fetch the logs of a container"}, {"logs", "Fetch the logs of a container"},
{"port", "Lookup the public-facing port that is NAT-ed to PRIVATE_PORT"}, {"port", "List port mappings or a specific mapping for the CONTAINER"},
{"pause", "Pause all processes within a container"}, {"pause", "Pause all processes within a container"},
{"ps", "List containers"}, {"ps", "List containers"},
{"pull", "Pull an image or a repository from a Docker registry server"}, {"pull", "Pull an image or a repository from a registry"},
{"push", "Push an image or a repository to a Docker registry server"}, {"push", "Push an image or a repository to a registry"},
{"rename", "Rename an existing container"}, {"rename", "Rename a container"},
{"restart", "Restart a running container"}, {"restart", "Restart a running container"},
{"rm", "Remove one or more containers"}, {"rm", "Remove one or more containers"},
{"rmi", "Remove one or more images"}, {"rmi", "Remove one or more images"},
{"run", "Run a command in a new container"}, {"run", "Run a command in a new container"},
{"save", "Save an image to a tar archive"}, {"save", "Save an image(s) to a tar archive"},
{"search", "Search for an image on the Docker Hub"}, {"search", "Search the Docker Hub for images"},
{"start", "Start a stopped container"}, {"start", "Start one or more stopped containers"},
{"stats", "Display a stream of a containers' resource usage statistics"}, {"stats", "Display a live stream of container(s) resource usage statistics"},
{"stop", "Stop a running container"}, {"stop", "Stop a running container"},
{"tag", "Tag an image into a repository"}, {"tag", "Tag an image into a repository"},
{"top", "Lookup the running processes of a container"}, {"top", "Display the running processes of a container"},
{"unpause", "Unpause a paused container"}, {"unpause", "Unpause all processes within a container"},
{"version", "Show the Docker version information"}, {"version", "Show the Docker version information"},
{"wait", "Block until a container stops, then print its exit code"}, {"wait", "Block until a container stops, then print its exit code"},
} }

View file

@ -13,7 +13,7 @@ weight=1
Usage: docker load [OPTIONS] Usage: docker load [OPTIONS]
Load an image from a tar archive on STDIN Load an image from a tar archive or STDIN
-i, --input="" Read from a tar archive file, instead of STDIN -i, --input="" Read from a tar archive file, instead of STDIN

View file

@ -2,7 +2,7 @@
% Docker Community % Docker Community
% JUNE 2014 % JUNE 2014
# NAME # NAME
docker-export - Export the contents of a filesystem as a tar archive to STDOUT docker-export - Export the contents of a container's filesystem as a tar archive
# SYNOPSIS # SYNOPSIS
**docker export** **docker export**

View file

@ -2,7 +2,7 @@
% Docker Community % Docker Community
% JUNE 2014 % JUNE 2014
# NAME # NAME
docker-load - Load an image from a tar archive on STDIN docker-load - Load an image from a tar archive or STDIN
# SYNOPSIS # SYNOPSIS
**docker load** **docker load**

View file

@ -2,7 +2,7 @@
% Docker Community % Docker Community
% JUNE 2014 % JUNE 2014
# NAME # NAME
docker-logout - Log out from a Docker Registry. docker-logout - Log out from a Docker registry.
# SYNOPSIS # SYNOPSIS
**docker logout** **docker logout**

View file

@ -11,7 +11,7 @@ CONTAINER [ps OPTIONS]
# DESCRIPTION # DESCRIPTION
Look up the running process of the container. ps-OPTION can be any of the Display the running process of the container. ps-OPTION can be any of the
options you would pass to a Linux ps command. options you would pass to a Linux ps command.
# OPTIONS # OPTIONS
@ -31,3 +31,4 @@ Run **docker top** with the ps option of -x:
April 2014, Originally compiled by William Henry (whenry at redhat dot com) April 2014, Originally compiled by William Henry (whenry at redhat dot com)
based on docker.com source material and internal work. based on docker.com source material and internal work.
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
June 2015, updated by Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>