usage.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. {"events", "Get real time events from the server"},
  14. {"exec", "Run a command in a running container"},
  15. {"images", "List images"},
  16. {"import", "Import the contents from a tarball to create a filesystem image"},
  17. {"info", "Display system-wide information"},
  18. {"inspect", "Return low-level information on a container or image"},
  19. {"kill", "Kill a running container"},
  20. {"load", "Load an image from a tar archive or STDIN"},
  21. {"login", "Log in to a Docker registry"},
  22. {"logout", "Log out from a Docker registry"},
  23. {"pause", "Pause all processes within a container"},
  24. {"port", "List port mappings or a specific mapping for the CONTAINER"},
  25. {"ps", "List containers"},
  26. {"pull", "Pull an image or a repository from a registry"},
  27. {"push", "Push an image or a repository to a registry"},
  28. {"rename", "Rename a container"},
  29. {"restart", "Restart a container"},
  30. {"rm", "Remove one or more containers"},
  31. {"save", "Save one or more images to a tar archive"},
  32. {"stats", "Display a live stream of container(s) resource usage statistics"},
  33. {"tag", "Tag an image into a repository"},
  34. {"top", "Display the running processes of a container"},
  35. {"update", "Update configuration of one or more containers"},
  36. {"version", "Show the Docker version information"},
  37. }
  38. // DockerCommands stores all the docker command
  39. var DockerCommands = make(map[string]Command)
  40. func init() {
  41. for _, cmd := range DockerCommandUsage {
  42. DockerCommands[cmd.Name] = cmd
  43. }
  44. }