{
    "description": "Open Container Initiative Runtime Specification Container Configuration Schema",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "ociVersion": {
            "$ref": "defs.json#/definitions/ociVersion"
        },
        "hooks": {
            "type": "object",
            "properties": {
                "prestart": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                },
                "createRuntime": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                },
                "createContainer": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                },
                "startContainer": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                },
                "poststart": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                },
                "poststop": {
                    "$ref": "defs.json#/definitions/ArrayOfHooks"
                }
            }
        },
        "annotations": {
            "$ref": "defs.json#/definitions/annotations"
        },
        "hostname": {
            "type": "string"
        },
        "mounts": {
            "type": "array",
            "items": {
                "$ref": "defs.json#/definitions/Mount"
            }
        },
        "root": {
            "description": "Configures the container's root filesystem.",
            "type": "object",
            "required": [
                "path"
            ],
            "properties": {
                "path": {
                    "$ref": "defs.json#/definitions/FilePath"
                },
                "readonly": {
                    "type": "boolean"
                }
            }
        },
        "process": {
            "type": "object",
            "required": [
                "cwd"
            ],
            "properties": {
                "args": {
                    "$ref": "defs.json#/definitions/ArrayOfStrings"
                },
                "commandLine": {
                    "type": "string"
                },
                "consoleSize": {
                    "type": "object",
                    "required": [
                        "height",
                        "width"
                    ],
                    "properties": {
                        "height": {
                            "$ref": "defs.json#/definitions/uint64"
                        },
                        "width": {
                            "$ref": "defs.json#/definitions/uint64"
                        }
                    }
                },
                "cwd": {
                    "type": "string"
                },
                "env": {
                    "$ref": "defs.json#/definitions/Env"
                },
                "terminal": {
                    "type": "boolean"
                },
                "user": {
                    "type": "object",
                    "properties": {
                        "uid": {
                            "$ref": "defs.json#/definitions/UID"
                        },
                        "gid": {
                            "$ref": "defs.json#/definitions/GID"
                        },
                        "umask": {
                            "$ref": "defs.json#/definitions/Umask"
                        },
                        "additionalGids": {
                            "$ref": "defs.json#/definitions/ArrayOfGIDs"
                        },
                        "username": {
                            "type": "string"
                        }
                    }
                },
                "capabilities": {
                    "type": "object",
                    "properties": {
                        "bounding": {
                            "$ref": "defs.json#/definitions/ArrayOfStrings"
                        },
                        "permitted": {
                            "$ref": "defs.json#/definitions/ArrayOfStrings"
                        },
                        "effective": {
                            "$ref": "defs.json#/definitions/ArrayOfStrings"
                        },
                        "inheritable": {
                            "$ref": "defs.json#/definitions/ArrayOfStrings"
                        },
                        "ambient": {
                            "$ref": "defs.json#/definitions/ArrayOfStrings"
                        }
                    }
                },
                "apparmorProfile": {
                    "type": "string"
                },
                "oomScoreAdj": {
                    "type": "integer"
                },
                "selinuxLabel": {
                    "type": "string"
                },
                "noNewPrivileges": {
                    "type": "boolean"
                },
                "rlimits": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "required": [
                            "type",
                            "soft",
                            "hard"
                        ],
                        "properties": {
                            "hard": {
                                "$ref": "defs.json#/definitions/uint64"
                            },
                            "soft": {
                                "$ref": "defs.json#/definitions/uint64"
                            },
                            "type": {
                                "type": "string",
                                "pattern": "^RLIMIT_[A-Z]+$"
                            }
                        }
                    }
                }
            }
        },
        "linux": {
            "$ref": "config-linux.json#/linux"
        },
        "solaris": {
            "$ref": "config-solaris.json#/solaris"
        },
        "windows": {
            "$ref": "config-windows.json#/windows"
        },
        "vm": {
            "$ref": "config-vm.json#/vm"
        }
    },
    "required": [
        "ociVersion"
    ]
}
