github.com/wulonghui/docker@v1.8.0-rc2/docker/flags.go (about) 1 package main 2 3 import flag "github.com/docker/docker/pkg/mflag" 4 5 var ( 6 flHelp = flag.Bool([]string{"h", "-help"}, false, "Print usage") 7 flVersion = flag.Bool([]string{"v", "-version"}, false, "Print version information and quit") 8 ) 9 10 type command struct { 11 name string 12 description string 13 } 14 15 type byName []command 16 17 func (a byName) Len() int { return len(a) } 18 func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } 19 func (a byName) Less(i, j int) bool { return a[i].name < a[j].name } 20 21 // TODO(tiborvass): do not show 'daemon' on client-only binaries 22 // and deduplicate description in dockerCommands and cli subcommands 23 var dockerCommands = []command{ 24 {"attach", "Attach to a running container"}, 25 {"build", "Build an image from a Dockerfile"}, 26 {"commit", "Create a new image from a container's changes"}, 27 {"cp", "Copy files/folders from a container to a HOSTDIR or to STDOUT"}, 28 {"create", "Create a new container"}, 29 {"diff", "Inspect changes on a container's filesystem"}, 30 {"events", "Get real time events from the server"}, 31 {"exec", "Run a command in a running container"}, 32 {"export", "Export a container's filesystem as a tar archive"}, 33 {"history", "Show the history of an image"}, 34 {"images", "List images"}, 35 {"import", "Import the contents from a tarball to create a filesystem image"}, 36 {"info", "Display system-wide information"}, 37 {"inspect", "Return low-level information on a container or image"}, 38 {"kill", "Kill a running container"}, 39 {"load", "Load an image from a tar archive or STDIN"}, 40 {"login", "Register or log in to a Docker registry"}, 41 {"logout", "Log out from a Docker registry"}, 42 {"logs", "Fetch the logs of a container"}, 43 {"port", "List port mappings or a specific mapping for the CONTAINER"}, 44 {"pause", "Pause all processes within a container"}, 45 {"ps", "List containers"}, 46 {"pull", "Pull an image or a repository from a registry"}, 47 {"push", "Push an image or a repository to a registry"}, 48 {"rename", "Rename a container"}, 49 {"restart", "Restart a running container"}, 50 {"rm", "Remove one or more containers"}, 51 {"rmi", "Remove one or more images"}, 52 {"run", "Run a command in a new container"}, 53 {"save", "Save an image(s) to a tar archive"}, 54 {"search", "Search the Docker Hub for images"}, 55 {"start", "Start one or more stopped containers"}, 56 {"stats", "Display a live stream of container(s) resource usage statistics"}, 57 {"stop", "Stop a running container"}, 58 {"tag", "Tag an image into a repository"}, 59 {"top", "Display the running processes of a container"}, 60 {"unpause", "Unpause all processes within a container"}, 61 {"version", "Show the Docker version information"}, 62 {"wait", "Block until a container stops, then print its exit code"}, 63 }