|
1 | 1 | //package oci.config.bundle; |
2 | 2 | package oci; |
3 | 3 |
|
4 | | -// Spec is the base configuration for the container. It specifies platform |
| 4 | +// Spec is the base configuration for the container. It specifies platform |
5 | 5 | // independent configuration. |
6 | 6 | message Spec { |
7 | 7 | // Version is the version of the specification that is supported. |
8 | | - optional string Version = 1; |
| 8 | + optional string version = 1; |
9 | 9 | // Platform is the host information for OS and Arch. |
10 | | - optional Platform Platform = 2; // [default=77]; |
| 10 | + optional Platform platform = 2; // [default=77]; |
11 | 11 | // Process is the container's main process. |
12 | | - optional Process Process = 3; |
| 12 | + optional Process process = 3; |
13 | 13 | // Root is the root information for the container's filesystem. |
14 | | - optional Root Root = 4; |
| 14 | + optional Root root = 4; |
15 | 15 | // Hostname is the container's host name. |
16 | | - optional string Hostname = 5; |
17 | | - // Mounts profile configuration for adding mounts to the container's filesystem. |
18 | | - repeated MountPoint Mounts = 6; |
| 16 | + optional string hostname = 5; |
| 17 | + // Mounts profile configuration for adding mounts to the container's |
| 18 | + // filesystem. |
| 19 | + repeated MountPoint mounts = 6; |
19 | 20 | } |
20 | 21 |
|
21 | 22 |
|
22 | 23 | // LinuxSpec is the full specification for linux containers. |
23 | 24 | message LinuxSpec { |
24 | | - optional Spec Spec = 1; |
25 | | - // LinuxConfig is platform specific configuration for linux based containers. |
26 | | - optional LinuxConfig LinuxConfig = 2; |
| 25 | + optional Spec spec = 1; |
| 26 | + // LinuxConfig is platform specific configuration for linux based |
| 27 | + // containers. |
| 28 | + optional LinuxConfig linux_config = 2; |
27 | 29 | } |
28 | 30 |
|
29 | | -// LinuxConfig contains platform specific configuration for linux based containers. |
| 31 | +// LinuxConfig contains platform specific configuration for linux based |
| 32 | +// containers. |
30 | 33 | message LinuxConfig { |
31 | 34 | // Capabilities are linux capabilities that are kept for the container. |
32 | | - repeated string Capabilities = 1; |
| 35 | + repeated string capabilities = 1; |
33 | 36 | } |
34 | 37 |
|
35 | | -// Platform specifies OS and arch information for the host system that the container |
36 | | -// is created for. |
| 38 | +// Platform specifies OS and arch information for the host system that the |
| 39 | +// container is created for. |
37 | 40 | message Platform { |
38 | 41 | // OS is the operating system. |
39 | | - optional string OS = 1; |
| 42 | + optional string os = 1; |
40 | 43 | // Arch is the architecture |
41 | | - optional string Arch = 2; |
| 44 | + optional string arch = 2; |
42 | 45 | } |
43 | 46 |
|
44 | | -// Process contains information to start a specific application inside the container. |
| 47 | +// Process contains information to start a specific application inside the |
| 48 | +// container. |
45 | 49 | message Process { |
46 | 50 | // Terminal creates an interactive terminal for the container. |
47 | | - optional bool Terminal = 1; |
| 51 | + optional bool terminal = 1; |
48 | 52 | // User specifies user information for the process. |
49 | | - optional User User = 2; |
50 | | - // Args specifies the binary and arguments for the application to execute. |
51 | | - repeated string Args = 3; |
| 53 | + optional User user = 2; |
| 54 | + // Args specifies the binary and arguments for the application to |
| 55 | + // execute. |
| 56 | + repeated string args = 3; |
52 | 57 | // Env populates the process environment for the process. |
53 | | - repeated string Env = 4; |
| 58 | + repeated string env = 4; |
54 | 59 | // Cwd is the current working directory for the process and must be |
55 | 60 | // relative to the container's root. |
56 | | - optional string Cwd = 5; |
| 61 | + optional string cwd = 5; |
57 | 62 | } |
58 | 63 |
|
59 | 64 | enum PlatformType { |
60 | | - LINUX = 1; |
| 65 | + LINUX = 1; |
61 | 66 | } |
62 | 67 |
|
63 | 68 | // User specifies user information for the process. |
64 | 69 | message User { |
65 | | - // Type so that receivers of this message can `switch` for the fields expected |
66 | | - optional PlatformType Type = 1 [default = LINUX]; |
| 70 | + // Type so that receivers of this message can `switch` for the fields |
| 71 | + // expected |
| 72 | + optional PlatformType type = 1 [default = LINUX]; |
67 | 73 |
|
68 | | - optional LinuxUser LinuxUser = 2; |
| 74 | + optional LinuxUser linux_type = 2; |
69 | 75 | } |
70 | 76 |
|
71 | | -// User specifies linux specific user and group information for the container's |
72 | | -// main process. |
| 77 | +// LinuxUser specifies linux specific user and group information for the |
| 78 | +// container's main process. |
73 | 79 | message LinuxUser { |
74 | | - // UID is the user id. |
75 | | - optional int32 UID = 1; |
76 | | - // GID is the group id. |
77 | | - optional int32 GID = 2; |
78 | | - repeated int32 AdditionalGids = 3; |
| 80 | + // Uid is the user id. |
| 81 | + optional int32 uid = 1; |
| 82 | + // Gid is the group id. |
| 83 | + optional int32 gid = 2; |
| 84 | + repeated int32 additional_gids = 3; |
79 | 85 | } |
80 | 86 |
|
81 | 87 | // Root contains information about the container's root filesystem on the host. |
82 | 88 | message Root { |
83 | 89 | // Path is the absolute path to the container's root filesystem. |
84 | | - optional string Path = 1; |
85 | | - // Readonly makes the root filesystem for the container readonly before the process is executed. |
86 | | - optional bool Readonly = 2; |
| 90 | + optional string path = 1; |
| 91 | + // Readonly makes the root filesystem for the container readonly before |
| 92 | + // the process is executed. |
| 93 | + optional bool readonly = 2; |
87 | 94 | } |
88 | 95 |
|
89 | | -// MountPoint describes a directory that may be fullfilled by a mount in the runtime.json. |
| 96 | +// MountPoint describes a directory that may be fullfilled by a mount in the |
| 97 | +// runtime.json. |
90 | 98 | message MountPoint { |
91 | 99 | // Name is a unique descriptive identifier for this mount point. |
92 | | - optional string Name = 1; |
93 | | - // 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. |
94 | | - optional string Path = 2; |
| 100 | + optional string name = 1; |
| 101 | + // Path specifies the path of the mount. The path and child directories |
| 102 | + // MUST exist, a runtime MUST NOT create directories automatically to a |
| 103 | + // mount point. |
| 104 | + optional string path = 2; |
95 | 105 | } |
0 commit comments