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. Platform string
  17. }
  18. // ContainerRmConfig holds arguments for the container remove
  19. // operation. This struct is used to tell the backend what operations
  20. // to perform.
  21. type ContainerRmConfig struct {
  22. ForceRemove, RemoveVolume, RemoveLink bool
  23. }
  24. // ContainerCommitConfig contains build configs for commit operation,
  25. // and is used when making a commit with the current state of the container.
  26. type ContainerCommitConfig struct {
  27. Pause bool
  28. Repo string
  29. Tag string
  30. Author string
  31. Comment string
  32. // merge container config into commit config before commit
  33. MergeConfigs bool
  34. Config *container.Config
  35. }
  36. // ExecConfig is a small subset of the Config struct that holds the configuration
  37. // for the exec feature of docker.
  38. type ExecConfig struct {
  39. User string // User that will run the command
  40. Privileged bool // Is the container in privileged mode
  41. Tty bool // Attach standard streams to a tty.
  42. AttachStdin bool // Attach the standard input, makes possible user interaction
  43. AttachStderr bool // Attach the standard error
  44. AttachStdout bool // Attach the standard output
  45. Detach bool // Execute in detach mode
  46. DetachKeys string // Escape keys for detach
  47. Env []string // Environment variables
  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. }