configs.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package types
  2. import (
  3. "github.com/docker/docker/api/types/container"
  4. "github.com/docker/docker/api/types/network"
  5. )
  6. // configs holds structs used for internal communication between the
  7. // frontend (such as an http server) and the backend (such as the
  8. // docker daemon).
  9. // ContainerCreateConfig is the parameter set to ContainerCreate()
  10. type ContainerCreateConfig struct {
  11. Name string
  12. Config *container.Config
  13. HostConfig *container.HostConfig
  14. NetworkingConfig *network.NetworkingConfig
  15. AdjustCPUShares bool
  16. }
  17. // ContainerRmConfig holds arguments for the container remove
  18. // operation. This struct is used to tell the backend what operations
  19. // to perform.
  20. type ContainerRmConfig struct {
  21. ForceRemove, RemoveVolume, RemoveLink bool
  22. }
  23. // ContainerCommitConfig contains build configs for commit operation,
  24. // and is used when making a commit with the current state of the container.
  25. type ContainerCommitConfig struct {
  26. Pause bool
  27. Repo string
  28. Tag string
  29. Author string
  30. Comment string
  31. // merge container config into commit config before commit
  32. MergeConfigs bool
  33. Config *container.Config
  34. }
  35. // ExecConfig is a small subset of the Config struct that holds the configuration
  36. // for the exec feature of docker.
  37. type ExecConfig struct {
  38. User string // User that will run the command
  39. Privileged bool // Is the container in privileged mode
  40. Tty bool // Attach standard streams to a tty.
  41. AttachStdin bool // Attach the standard input, makes possible user interaction
  42. AttachStderr bool // Attach the standard error
  43. AttachStdout bool // Attach the standard output
  44. Detach bool // Execute in detach mode
  45. DetachKeys string // Escape keys for detach
  46. Env []string // Environment variables
  47. WorkingDir string // Working directory
  48. Cmd []string // Execution commands and args
  49. }
  50. // PluginRmConfig holds arguments for plugin remove.
  51. type PluginRmConfig struct {
  52. ForceRemove bool
  53. }
  54. // PluginEnableConfig holds arguments for plugin enable
  55. type PluginEnableConfig struct {
  56. Timeout int
  57. }
  58. // PluginDisableConfig holds arguments for plugin disable.
  59. type PluginDisableConfig struct {
  60. ForceDisable bool
  61. }