github.com/fntlnz/docker@v1.9.0-rc3/cli/common.go (about) 1 package cli 2 3 import ( 4 flag "github.com/docker/docker/pkg/mflag" 5 "github.com/docker/docker/pkg/tlsconfig" 6 ) 7 8 // CommonFlags represents flags that are common to both the client and the daemon. 9 type CommonFlags struct { 10 FlagSet *flag.FlagSet 11 PostParse func() 12 13 Debug bool 14 Hosts []string 15 LogLevel string 16 TLS bool 17 TLSVerify bool 18 TLSOptions *tlsconfig.Options 19 TrustKey string 20 } 21 22 // Command is the struct contains command name and description 23 type Command struct { 24 Name string 25 Description string 26 } 27 28 var dockerCommands = []Command{ 29 {"attach", "Attach to a running container"}, 30 {"build", "Build an image from a Dockerfile"}, 31 {"commit", "Create a new image from a container's changes"}, 32 {"cp", "Copy files/folders between a container and the local filesystem"}, 33 {"create", "Create a new container"}, 34 {"diff", "Inspect changes on a container's filesystem"}, 35 {"events", "Get real time events from the server"}, 36 {"exec", "Run a command in a running container"}, 37 {"export", "Export a container's filesystem as a tar archive"}, 38 {"history", "Show the history of an image"}, 39 {"images", "List images"}, 40 {"import", "Import the contents from a tarball to create a filesystem image"}, 41 {"info", "Display system-wide information"}, 42 {"inspect", "Return low-level information on a container or image"}, 43 {"kill", "Kill a running container"}, 44 {"load", "Load an image from a tar archive or STDIN"}, 45 {"login", "Register or log in to a Docker registry"}, 46 {"logout", "Log out from a Docker registry"}, 47 {"logs", "Fetch the logs of a container"}, 48 {"network", "Manage Docker networks"}, 49 {"pause", "Pause all processes within a container"}, 50 {"port", "List port mappings or a specific mapping for the CONTAINER"}, 51 {"ps", "List containers"}, 52 {"pull", "Pull an image or a repository from a registry"}, 53 {"push", "Push an image or a repository to a registry"}, 54 {"rename", "Rename a container"}, 55 {"restart", "Restart a container"}, 56 {"rm", "Remove one or more containers"}, 57 {"rmi", "Remove one or more images"}, 58 {"run", "Run a command in a new container"}, 59 {"save", "Save an image(s) to a tar archive"}, 60 {"search", "Search the Docker Hub for images"}, 61 {"start", "Start one or more stopped containers"}, 62 {"stats", "Display a live stream of container(s) resource usage statistics"}, 63 {"stop", "Stop a running container"}, 64 {"tag", "Tag an image into a repository"}, 65 {"top", "Display the running processes of a container"}, 66 {"unpause", "Unpause all processes within a container"}, 67 {"version", "Show the Docker version information"}, 68 {"volume", "Manage Docker volumes"}, 69 {"wait", "Block until a container stops, then print its exit code"}, 70 } 71 72 // DockerCommands stores all the docker command 73 var DockerCommands = make(map[string]Command) 74 75 func init() { 76 for _, cmd := range dockerCommands { 77 DockerCommands[cmd.Name] = cmd 78 } 79 }