usage.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package cli
  2. // Command is the struct containing the command name and description
  3. type Command struct {
  4. Name string
  5. Description string
  6. }
  7. // DockerCommandUsage lists the top level docker commands and their short usage
  8. var DockerCommandUsage = []Command{
  9. {"build", "Build an image from a Dockerfile"},
  10. {"commit", "Create a new image from a container's changes"},
  11. {"cp", "Copy files/folders between a container and the local filesystem"},
  12. {"events", "Get real time events from the server"},
  13. {"exec", "Run a command in a running container"},
  14. {"info", "Display system-wide information"},
  15. {"inspect", "Return low-level information on a container or image"},
  16. {"load", "Load an image from a tar archive or STDIN"},
  17. {"login", "Log in to a Docker registry"},
  18. {"logout", "Log out from a Docker registry"},
  19. {"ps", "List containers"},
  20. {"pull", "Pull an image or a repository from a registry"},
  21. {"push", "Push an image or a repository to a registry"},
  22. {"rm", "Remove one or more containers"},
  23. {"save", "Save one or more images to a tar archive"},
  24. {"stats", "Display a live stream of container(s) resource usage statistics"},
  25. {"tag", "Tag an image into a repository"},
  26. {"update", "Update configuration of one or more containers"},
  27. {"version", "Show the Docker version information"},
  28. }
  29. // DockerCommands stores all the docker command
  30. var DockerCommands = make(map[string]Command)
  31. func init() {
  32. for _, cmd := range DockerCommandUsage {
  33. DockerCommands[cmd.Name] = cmd
  34. }
  35. }