configs.go 1.7 KB

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