Youki · Schema

Oci Runtime Config

Open Container Initiative Runtime Specification Container Configuration Schema

ContainersContainer RuntimeOCIRustCNCFCloud NativeKubernetes

Properties

Name Type Description
ociVersion object
hooks object
annotations object
hostname string
domainname string
mounts array
root object Configures the container's root filesystem.
process object
linux object
solaris object
windows object
vm object
zos object
freebsd object
View JSON Schema on GitHub

JSON Schema

oci-runtime-config-schema.json Raw ↑
{
    "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"
        },
        "domainname": {
            "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"
                },
                "ioPriority": {
                    "type": "object",
                    "required": [
                        "class"
                    ],
                    "properties": {
                        "class": {
                            "type": "string",
                            "enum": [
                                "IOPRIO_CLASS_RT",
                                "IOPRIO_CLASS_BE",
                                "IOPRIO_CLASS_IDLE"
                            ]
                        },
                        "priority": {
                            "$ref": "defs.json#/definitions/int32"
                        }
                    }
                },
                "noNewPrivileges": {
                    "type": "boolean"
                },
                "scheduler": {
                    "type": "object",
                    "required": [
                        "policy"
                    ],
                    "properties": {
                        "policy": {
                            "$ref": "defs-linux.json#/definitions/SchedulerPolicy"
                        },
                        "nice": {
                            "$ref": "defs.json#/definitions/int32"
                        },
                        "priority": {
                            "$ref": "defs.json#/definitions/int32"
                        },
                        "flags": {
                            "type": "array",
                            "items": {
                                "$ref": "defs-linux.json#/definitions/SchedulerFlag"
                            }
                        },
                        "runtime": {
                            "$ref": "defs.json#/definitions/uint64"
                        },
                        "deadline": {
                            "$ref": "defs.json#/definitions/uint64"
                        },
                        "period": {
                            "$ref": "defs.json#/definitions/uint64"
                        }
                    }
                },
                "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]+$"
                            }
                        }
                    }
                },
                "execCPUAffinity": {
                    "type": "object",
                    "properties": {
                        "initial": {
                            "type": "string",
                            "pattern": "^[0-9, -]*$"
                        },
                        "final": {
                            "type": "string",
                            "pattern": "^[0-9, -]*$"
                        }
                    }
                }
            }
        },
        "linux": {
            "$ref": "config-linux.json#/linux"
        },
        "solaris": {
            "$ref": "config-solaris.json#/solaris"
        },
        "windows": {
            "$ref": "config-windows.json#/windows"
        },
        "vm": {
            "$ref": "config-vm.json#/vm"
        },
        "zos": {
            "$ref": "config-zos.json#/zos"
        },
        "freebsd": {
            "$ref": "config-freebsd.json#/freebsd"
        }
    },
    "required": [
        "ociVersion"
    ]
}