types_linux.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. // Stats contains a stats properties from containerd.
  33. type Stats containerd.StatsResponse
  34. // Summary container a container summary from containerd
  35. type Summary struct{}
  36. // User specifies linux specific user and group information for the container's
  37. // main process.
  38. type User specs.User
  39. // Resources defines updatable container resource values.
  40. type Resources containerd.UpdateResource