|
| 1 | +package oci; |
| 2 | + |
| 3 | +// Spec is the base configuration for the container. It specifies platform |
| 4 | +// independent configuration. |
| 5 | +message Spec { |
| 6 | + // Version is the version of the specification that is supported. |
| 7 | + required string Version = 1; |
| 8 | + // Platform is the host information for OS and Arch. |
| 9 | + required Platform Platform = 2; // [default=77]; |
| 10 | + // Process is the container's main process. |
| 11 | + required Process Process = 3; |
| 12 | + // Root is the root information for the container's filesystem. |
| 13 | + required Root Root = 4; |
| 14 | + // Hostname is the container's host name. |
| 15 | + required string Hostname = 5; |
| 16 | + // Mounts profile configuration for adding mounts to the container's filesystem. |
| 17 | + repeated MountPoint Mounts = 6; |
| 18 | +} |
| 19 | + |
| 20 | +// Platform specifies OS and arch information for the host system that the container |
| 21 | +// is created for. |
| 22 | +message Platform { |
| 23 | + // OS is the operating system. |
| 24 | + required string OS = 1; |
| 25 | + // Arch is the architecture |
| 26 | + required string Arch = 2; |
| 27 | +} |
| 28 | + |
| 29 | +// Process contains information to start a specific application inside the container. |
| 30 | +message Process { |
| 31 | + // Terminal creates an interactive terminal for the container. |
| 32 | + required bool Terminal = 1; |
| 33 | + // User specifies user information for the process. |
| 34 | + // TODO(vbatts) figure out platform dependent types |
| 35 | + //required User User = 2; |
| 36 | + // Args specifies the binary and arguments for the application to execute. |
| 37 | + repeated string Args = 3; |
| 38 | + // Env populates the process environment for the process. |
| 39 | + repeated string Env = 4; |
| 40 | + // Cwd is the current working directory for the process and must be |
| 41 | + // relative to the container's root. |
| 42 | + required string Cwd = 5; |
| 43 | +} |
| 44 | + |
| 45 | +// Root contains information about the container's root filesystem on the host. |
| 46 | +message Root { |
| 47 | + // Path is the absolute path to the container's root filesystem. |
| 48 | + required string Path = 1; |
| 49 | + // Readonly makes the root filesystem for the container readonly before the process is executed. |
| 50 | + required bool Readonly = 2; |
| 51 | +} |
| 52 | + |
| 53 | +// MountPoint describes a directory that may be fullfilled by a mount in the runtime.json. |
| 54 | +message MountPoint { |
| 55 | + // Name is a unique descriptive identifier for this mount point. |
| 56 | + required string Name = 1; |
| 57 | + // Path specifies the path of the mount. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point. |
| 58 | + required string Path = 2; |
| 59 | +} |
0 commit comments