usage.go 2.2 KB

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