usage.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. {"history", "Show the history of an image"},
  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. {"wait", "Block until a container stops, then print its exit code"},
  38. }
  39. // DockerCommands stores all the docker command
  40. var DockerCommands = make(map[string]Command)
  41. func init() {
  42. for _, cmd := range DockerCommandUsage {
  43. DockerCommands[cmd.Name] = cmd
  44. }
  45. }