usage.go 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. {"attach", "Attach to a running container"},
  10. {"build", "Build an image from a Dockerfile"},
  11. {"commit", "Create a new image from a container's changes"},
  12. {"cp", "Copy files/folders between a container and the local filesystem"},
  13. {"diff", "Inspect changes on a container's filesystem"},
  14. {"events", "Get real time events from the server"},
  15. {"exec", "Run a command in a running container"},
  16. {"history", "Show the history of an image"},
  17. {"images", "List images"},
  18. {"import", "Import the contents from a tarball to create a filesystem image"},
  19. {"info", "Display system-wide information"},
  20. {"inspect", "Return low-level information on a container or image"},
  21. {"kill", "Kill a running container"},
  22. {"load", "Load an image from a tar archive or STDIN"},
  23. {"login", "Log in to a Docker registry"},
  24. {"logout", "Log out from a Docker registry"},
  25. {"logs", "Fetch the logs of a container"},
  26. {"network", "Manage Docker networks"},
  27. {"pause", "Pause all processes within a container"},
  28. {"port", "List port mappings or a specific mapping for the CONTAINER"},
  29. {"ps", "List containers"},
  30. {"pull", "Pull an image or a repository from a registry"},
  31. {"push", "Push an image or a repository to a registry"},
  32. {"rename", "Rename a container"},
  33. {"restart", "Restart a container"},
  34. {"rm", "Remove one or more containers"},
  35. {"save", "Save one or more images to a tar archive"},
  36. {"stats", "Display a live stream of container(s) resource usage statistics"},
  37. {"tag", "Tag an image into a repository"},
  38. {"top", "Display the running processes of a container"},
  39. {"unpause", "Unpause all processes within a container"},
  40. {"update", "Update configuration of one or more containers"},
  41. {"version", "Show the Docker version information"},
  42. {"wait", "Block until a container stops, then print its exit code"},
  43. }
  44. // DockerCommands stores all the docker command
  45. var DockerCommands = make(map[string]Command)
  46. func init() {
  47. for _, cmd := range DockerCommandUsage {
  48. DockerCommands[cmd.Name] = cmd
  49. }
  50. }