1{
2    "description": "Open Container Initiative Runtime Specification Container Configuration Schema",
3    "$schema": "http://json-schema.org/draft-04/schema#",
4    "type": "object",
5    "properties": {
6        "ociVersion": {
7            "$ref": "defs.json#/definitions/ociVersion"
8        },
9        "hooks": {
10            "type": "object",
11            "properties": {
12                "prestart": {
13                    "$ref": "defs.json#/definitions/ArrayOfHooks"
14                },
15                "createRuntime": {
16                    "$ref": "defs.json#/definitions/ArrayOfHooks"
17                },
18                "createContainer": {
19                    "$ref": "defs.json#/definitions/ArrayOfHooks"
20                },
21                "startContainer": {
22                    "$ref": "defs.json#/definitions/ArrayOfHooks"
23                },
24                "poststart": {
25                    "$ref": "defs.json#/definitions/ArrayOfHooks"
26                },
27                "poststop": {
28                    "$ref": "defs.json#/definitions/ArrayOfHooks"
29                }
30            }
31        },
32        "annotations": {
33            "$ref": "defs.json#/definitions/annotations"
34        },
35        "hostname": {
36            "type": "string"
37        },
38        "mounts": {
39            "type": "array",
40            "items": {
41                "$ref": "defs.json#/definitions/Mount"
42            }
43        },
44        "root": {
45            "description": "Configures the container's root filesystem.",
46            "type": "object",
47            "required": [
48                "path"
49            ],
50            "properties": {
51                "path": {
52                    "$ref": "defs.json#/definitions/FilePath"
53                },
54                "readonly": {
55                    "type": "boolean"
56                }
57            }
58        },
59        "process": {
60            "type": "object",
61            "required": [
62                "cwd"
63            ],
64            "properties": {
65                "args": {
66                    "$ref": "defs.json#/definitions/ArrayOfStrings"
67                },
68                "commandLine": {
69                    "type": "string"
70                },
71                "consoleSize": {
72                    "type": "object",
73                    "required": [
74                        "height",
75                        "width"
76                    ],
77                    "properties": {
78                        "height": {
79                            "$ref": "defs.json#/definitions/uint64"
80                        },
81                        "width": {
82                            "$ref": "defs.json#/definitions/uint64"
83                        }
84                    }
85                },
86                "cwd": {
87                    "type": "string"
88                },
89                "env": {
90                    "$ref": "defs.json#/definitions/Env"
91                },
92                "terminal": {
93                    "type": "boolean"
94                },
95                "user": {
96                    "type": "object",
97                    "properties": {
98                        "uid": {
99                            "$ref": "defs.json#/definitions/UID"
100                        },
101                        "gid": {
102                            "$ref": "defs.json#/definitions/GID"
103                        },
104                        "umask": {
105                            "$ref": "defs.json#/definitions/Umask"
106                        },
107                        "additionalGids": {
108                            "$ref": "defs.json#/definitions/ArrayOfGIDs"
109                        },
110                        "username": {
111                            "type": "string"
112                        }
113                    }
114                },
115                "capabilities": {
116                    "type": "object",
117                    "properties": {
118                        "bounding": {
119                            "$ref": "defs.json#/definitions/ArrayOfStrings"
120                        },
121                        "permitted": {
122                            "$ref": "defs.json#/definitions/ArrayOfStrings"
123                        },
124                        "effective": {
125                            "$ref": "defs.json#/definitions/ArrayOfStrings"
126                        },
127                        "inheritable": {
128                            "$ref": "defs.json#/definitions/ArrayOfStrings"
129                        },
130                        "ambient": {
131                            "$ref": "defs.json#/definitions/ArrayOfStrings"
132                        }
133                    }
134                },
135                "apparmorProfile": {
136                    "type": "string"
137                },
138                "oomScoreAdj": {
139                    "type": "integer"
140                },
141                "selinuxLabel": {
142                    "type": "string"
143                },
144                "noNewPrivileges": {
145                    "type": "boolean"
146                },
147                "rlimits": {
148                    "type": "array",
149                    "items": {
150                        "type": "object",
151                        "required": [
152                            "type",
153                            "soft",
154                            "hard"
155                        ],
156                        "properties": {
157                            "hard": {
158                                "$ref": "defs.json#/definitions/uint64"
159                            },
160                            "soft": {
161                                "$ref": "defs.json#/definitions/uint64"
162                            },
163                            "type": {
164                                "type": "string",
165                                "pattern": "^RLIMIT_[A-Z]+$"
166                            }
167                        }
168                    }
169                }
170            }
171        },
172        "linux": {
173            "$ref": "config-linux.json#/linux"
174        },
175        "solaris": {
176            "$ref": "config-solaris.json#/solaris"
177        },
178        "windows": {
179            "$ref": "config-windows.json#/windows"
180        },
181        "vm": {
182            "$ref": "config-vm.json#/vm"
183        }
184    },
185    "required": [
186        "ociVersion"
187    ]
188}
189