types_linux.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package libcontainerd
  2. import (
  3. containerd "github.com/docker/containerd/api/grpc/types"
  4. "github.com/opencontainers/specs/specs-go"
  5. )
  6. // Spec is the base configuration for the container. It specifies platform
  7. // independent configuration. This information must be included when the
  8. // bundle is packaged for distribution.
  9. type Spec specs.Spec
  10. // Process contains information to start a specific application inside the container.
  11. type Process struct {
  12. // Terminal creates an interactive terminal for the container.
  13. Terminal bool `json:"terminal"`
  14. // User specifies user information for the process.
  15. User *User `json:"user"`
  16. // Args specifies the binary and arguments for the application to execute.
  17. Args []string `json:"args"`
  18. // Env populates the process environment for the process.
  19. Env []string `json:"env,omitempty"`
  20. // Cwd is the current working directory for the process and must be
  21. // relative to the container's root.
  22. Cwd *string `json:"cwd"`
  23. // Capabilities are linux capabilities that are kept for the container.
  24. Capabilities []string `json:"capabilities,omitempty"`
  25. // Rlimits specifies rlimit options to apply to the process.
  26. Rlimits []specs.Rlimit `json:"rlimits,omitempty"`
  27. // ApparmorProfile specified the apparmor profile for the container.
  28. ApparmorProfile *string `json:"apparmorProfile,omitempty"`
  29. // SelinuxProcessLabel specifies the selinux context that the container process is run as.
  30. SelinuxLabel *string `json:"selinuxLabel,omitempty"`
  31. }
  32. // StateInfo contains description about the new state container has entered.
  33. type StateInfo struct {
  34. CommonStateInfo
  35. // Platform specific StateInfo
  36. OOMKilled bool
  37. }
  38. // Stats contains a stats properties from containerd.
  39. type Stats containerd.StatsResponse
  40. // Summary container a container summary from containerd
  41. type Summary struct{}
  42. // User specifies linux specific user and group information for the container's
  43. // main process.
  44. type User specs.User
  45. // Resources defines updatable container resource values.
  46. type Resources containerd.UpdateResource