{ "description": "Definitions used throughout the OpenContainer Specification", "definitions": { "int8": { "type": "integer", "minimum": -128, "maximum": 127 }, "int16": { "type": "integer", "minimum": -32768, "maximum": 32767 }, "int32": { "type": "integer", "minimum": -2147483648, "maximum": 2147483647 }, "int64": { "type": "integer", "minimum": -9223372036854776000, "maximum": 9223372036854776000 }, "uint8": { "type": "integer", "minimum": 0, "maximum": 255 }, "uint16": { "type": "integer", "minimum": 0, "maximum": 65535 }, "uint32": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, "uint64": { "type": "integer", "minimum": 0, "maximum": 18446744073709552000 }, "int32Pointer": { "oneOf": [{ "$ref": "#/definitions/int32" }, { "type": "null" } ] }, "uint16Pointer": { "oneOf": [{ "$ref": "#/definitions/uint16" }, { "type": "null" } ] }, "uint64Pointer": { "oneOf": [{ "$ref": "#/definitions/uint64" }, { "type": "null" } ] }, "stringPointer": { "oneOf": [{ "type": "string" }, { "type": "null" } ] }, "percent": { "type": "integer", "minimum": 0, "maximum": 100 }, "UID": { "$ref": "#/definitions/uint32" }, "GID": { "$ref": "#/definitions/uint32" }, "ArrayOfGIDs": { "type": "array", "items": { "$ref": "#/definitions/GID" } }, "FilePath": { "type": "string" }, "Env": { "$ref": "#/definitions/ArrayOfStrings" }, "BlkioDevice": { "type": "object", "properties": { "Path": { "$ref": "#/definitions/FilePath" }, "Rate": { "$ref": "#/definitions/uint64" } } }, "ArrayOfBlkioDevice": { "type": "array", "items": { "$ref": "#/definitions/BlkioDevice" } }, "BlkioWeightDevice": { "type": "object", "properties": { "Path": { "$ref": "#/definitions/FilePath" }, "Weight": { "$ref": "#/definitions/uint16" } } }, "ArrayOfBlkioWeightDevice": { "type": "array", "items": { "$ref": "#/definitions/BlkioWeightDevice" } }, "Hook": { "type": "object", "properties": { "path": { "$ref": "#/definitions/FilePath" }, "args": { "$ref": "#/definitions/ArrayOfStrings" }, "env": { "$ref": "#/definitions/Env" }, "timeout": { "type": "integer", "minimum": 1 } }, "required": [ "path" ] }, "ArrayOfHooks": { "type": "array", "items": { "$ref": "#/definitions/Hook" } }, "IDMapping": { "type": "object", "properties": { "hostID": { "$ref": "#/definitions/uint32" }, "containerID": { "$ref": "#/definitions/uint32" }, "size": { "$ref": "#/definitions/uint32" } }, "required": [ "hostID", "containerID", "size" ] }, "Mount": { "type": "object", "properties": { "source": { "$ref": "#/definitions/FilePath" }, "destination": { "$ref": "#/definitions/FilePath" }, "options": { "$ref": "#/definitions/ArrayOfStrings" }, "type": { "type": "string" } }, "required": [ "destination" ] }, "ArrayOfStrings": { "type": "array", "items": { "type": "string" } }, "mapStringString": { "type": "object", "patternProperties": { ".{1,}": { "type": "string" } } }, "mapStringInt": { "type": "object", "patternProperties": { ".{1,}": { "type": "integer" } } }, "mapStringInt64": { "type": "object", "patternProperties": { ".{1,}": { "type": "int64" } } }, "mapStringBool": { "type": "object", "patternProperties": { ".{1,}": { "type": "boolean" } } }, "mapIntString": { "type": "object", "patternProperties": { ".{2,}": { "type": "string" } } }, "mapIntInt": { "type": "object", "patternProperties": { ".{2,}": { "type": "integer" } } }, "mapIntBool": { "type": "object", "patternProperties": { ".{2,}": { "type": "boolean" } } }, "mapStringObject": { "type": "object", "patternProperties": { ".{1,}": { "type": "object" } } }, "mapStringObjectRuntimes": { "type": "object", "patternProperties": { ".{1,}": { "type": "object", "properties": { "path": { "type": "string" }, "runtime-args": { "type": "array", "items": { "type": "string" } } } } } }, "mapStringObjectAuths": { "type": "object", "patternProperties": { ".{1,}": { "type": "object", "properties": { "auth": { "type": "string" } } } } }, "digest": { "type": "string", "pattern": "^[a-z0-9]+(?:[+._-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$" }, "ociVersion": { "description": "The version of Open Container Runtime Specification that the document complies with", "type": "string" }, "annotations": { "$ref": "#/definitions/mapStringString" }, "HealthCheck": { "type": "object", "properties": { "Test": { "type": "array", "items": { "type": "string" } }, "Interval": { "type": "int64" }, "Timeout": { "type": "int64" }, "StartPeriod": { "type": "int64" }, "Retries": { "type": "integer" }, "ExitOnUnhealthy": { "type": "boolean" } } }, "Health": { "type": "object", "properties": { "Status": { "type": "string" }, "FailingStreak": { "type": "integer" }, "Log": { "type": "array", "items": { "type": "object", "properties": { "Start": { "type": "string" }, "End": { "type": "string" }, "ExitCode": { "type": "integer" }, "Output": { "type": "string" } } } } } }, "filters": { "type": "object", "patternProperties": { ".{1,}": { "$ref": "#/definitions/mapStringBool" } } }, "any": { "type": "object", "properties": { "type_url": { "type": "string" }, "value": { "type": "array", "items": { "type": "byte" } } } }, "zone": { "type": "object", "properties": { "name": { "type": "string" }, "offset": { "$ref": "#/definitions/uint8" }, "isDST": { "type": "boolean" } } }, "zoneTrans": { "type": "object", "properties": { "wnen": { "$ref": "#/definitions/int64" }, "index": { "$ref": "#/definitions/uint8" }, "isstd": { "type": "boolean" }, "isutc": { "type": "boolean" } } }, "location": { "type": "object", "properties": { "name": { "type": "string" }, "zone": { "type": "array", "items": { "$ref": "#/definitions/zone" } }, "tx": { "type": "array", "items": { "$ref": "#/definitions/zoneTrans" } }, "cacheStart": { "$ref": "#/definitions/int64" }, "cacheEnd": { "$ref": "#/definitions/int64" }, "cacheZone": { "$ref": "#/definitions/zone" } } }, "time": { "type": "object", "properties": { "wall": { "$ref": "#/definitions/uint64" }, "ext": { "$ref": "#/definitions/int64" }, "loc": { "$ref": "#/definitions/location" } } }, "RootfsPropagation": { "type": "string", "enum": [ "private", "shared", "slave", "unbindable" ] }, "SeccompArch": { "type": "string", "enum": [ "SCMP_ARCH_X86", "SCMP_ARCH_X86_64", "SCMP_ARCH_X32", "SCMP_ARCH_ARM", "SCMP_ARCH_AARCH64", "SCMP_ARCH_MIPS", "SCMP_ARCH_MIPS64", "SCMP_ARCH_MIPS64N32", "SCMP_ARCH_MIPSEL", "SCMP_ARCH_MIPSEL64", "SCMP_ARCH_MIPSEL64N32", "SCMP_ARCH_PPC", "SCMP_ARCH_PPC64", "SCMP_ARCH_PPC64LE", "SCMP_ARCH_S390", "SCMP_ARCH_S390X", "SCMP_ARCH_PARISC", "SCMP_ARCH_PARISC64" ] }, "SeccompAction": { "type": "string", "enum": [ "SCMP_ACT_KILL", "SCMP_ACT_TRAP", "SCMP_ACT_ERRNO", "SCMP_ACT_TRACE", "SCMP_ACT_ALLOW" ] }, "SeccompOperators": { "type": "string", "enum": [ "SCMP_CMP_NE", "SCMP_CMP_LT", "SCMP_CMP_LE", "SCMP_CMP_EQ", "SCMP_CMP_GE", "SCMP_CMP_GT", "SCMP_CMP_MASKED_EQ" ] }, "SyscallArg": { "type": "object", "properties": { "index": { "$ref": "#/definitions/uint32" }, "value": { "$ref": "#/definitions/uint64" }, "valueTwo": { "$ref": "#/definitions/uint64" }, "op": { "$ref": "#/definitions/SeccompOperators" } }, "required": [ "index", "value", "op" ] }, "Syscall": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "action": { "$ref": "#/definitions/SeccompAction" }, "args": { "type": "array", "items": { "$ref": "#/definitions/SyscallArg" } } }, "required": [ "names", "action" ] }, "Major": { "description": "major device number", "$ref": "#/definitions/int64" }, "Minor": { "description": "minor device number", "$ref": "#/definitions/int64" }, "FileMode": { "description": "File permissions mode (typically an octal value)", "type": "integer", "minimum": 0, "maximum": 512 }, "FileType": { "description": "Type of a block or special character device", "type": "string", "pattern": "^[cbup]$" }, "Device": { "type": "object", "required": [ "type", "path" ], "properties": { "type": { "$ref": "#/definitions/FileType" }, "path": { "$ref": "#/definitions/FilePath" }, "fileMode": { "$ref": "#/definitions/FileMode" }, "major": { "$ref": "#/definitions/Major" }, "minor": { "$ref": "#/definitions/Minor" }, "uid": { "$ref": "#/definitions/UID" }, "gid": { "$ref": "#/definitions/GID" } } }, "weight": { "type": "integer" }, "blockIODevice": { "type": "object", "properties": { "major": { "$ref": "#/definitions/Major" }, "minor": { "$ref": "#/definitions/Minor" } }, "required": [ "major", "minor" ] }, "blockIODeviceWeight": { "type": "object", "allOf": [{ "$ref": "#/definitions/blockIODevice" }, { "type": "object", "properties": { "weight": { "$ref": "#/definitions/weight" }, "leafWeight": { "$ref": "#/definitions/weight" } } } ] }, "blockIODeviceThrottle": { "allOf": [{ "$ref": "#/definitions/blockIODevice" }, { "type": "object", "properties": { "rate": { "$ref": "#/definitions/uint64" } } } ] }, "DeviceCgroup": { "type": "object", "properties": { "allow": { "type": "boolean" }, "type": { "type": "string" }, "major": { "$ref": "#/definitions/Major" }, "minor": { "$ref": "#/definitions/Minor" }, "access": { "type": "string" } }, "required": [ "allow" ] }, "NetworkInterfacePriority": { "type": "object", "properties": { "name": { "type": "string" }, "priority": { "$ref": "#/definitions/uint32" } }, "required": [ "name", "priority" ] }, "NamespaceType": { "type": "string", "enum": [ "mount", "pid", "network", "uts", "ipc", "user", "cgroup" ] }, "NamespaceReference": { "type": "object", "properties": { "type": { "$ref": "#/definitions/NamespaceType" }, "path": { "$ref": "#/definitions/FilePath" } }, "required": [ "type" ] }, "processInfo": { "type": "object", "properties": { "pid": { "$ref": "#/definitions/uint32" }, "info": { "$ref": "#/definitions/any" } } }, "process": { "id": "https://opencontainers.org/schema/bundle/process", "type": "object", "required": [ "cwd", "args" ], "properties": { "args": { "id": "https://opencontainers.org/schema/bundle/process/args", "$ref": "#/definitions/ArrayOfStrings" }, "consoleSize": { "id": "https://opencontainers.org/schema/bundle/process/consoleSize", "type": "object", "required": [ "height", "width" ], "properties": { "height": { "id": "https://opencontainers.org/schema/bundle/process/consoleSize/height", "$ref": "#/definitions/uint64" }, "width": { "id": "https://opencontainers.org/schema/bundle/process/consoleSize/width", "$ref": "#/definitions/uint64" } } }, "cwd": { "id": "https://opencontainers.org/schema/bundle/process/cwd", "type": "string" }, "env": { "id": "https://opencontainers.org/schema/bundle/process/env", "$ref": "#/definitions/Env" }, "terminal": { "id": "https://opencontainers.org/schema/bundle/process/terminal", "type": "boolean" }, "user": { "id": "https://opencontainers.org/schema/bundle/process/user", "type": "object", "properties": { "uid": { "id": "https://opencontainers.org/schema/bundle/process/user/uid", "$ref": "#/definitions/UID" }, "gid": { "id": "https://opencontainers.org/schema/bundle/process/user/gid", "$ref": "#/definitions/GID" }, "additionalGids": { "id": "https://opencontainers.org/schema/bundle/process/user/additionalGids", "$ref": "#/definitions/ArrayOfGIDs" }, "username": { "id": "https://opencontainers.org/schema/bundle/process/user/username", "type": "string" } } }, "capabilities": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities", "type": "object", "properties": { "bounding": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities/bounding", "type": "array", "items": { "type": "string" } }, "permitted": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities/permitted", "type": "array", "items": { "type": "string" } }, "effective": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities/effective", "type": "array", "items": { "type": "string" } }, "inheritable": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities/inheritable", "type": "array", "items": { "type": "string" } }, "ambient": { "id": "https://opencontainers.org/schema/bundle/process/linux/capabilities/ambient", "type": "array", "items": { "type": "string" } } } }, "apparmorProfile": { "id": "https://opencontainers.org/schema/bundle/process/linux/apparmorProfile", "type": "string" }, "oomScoreAdj": { "id": "https://opencontainers.org/schema/bundle/process/linux/oomScoreAdj", "type": "integer" }, "selinuxLabel": { "id": "https://opencontainers.org/schema/bundle/process/linux/selinuxLabel", "type": "string" }, "noNewPrivileges": { "id": "https://opencontainers.org/schema/bundle/process/linux/noNewPrivileges", "type": "boolean" }, "rlimits": { "id": "https://opencontainers.org/schema/bundle/linux/rlimits", "type": "array", "items": { "id": "https://opencontainers.org/schema/bundle/linux/rlimits/0", "type": "object", "required": [ "type", "soft", "hard" ], "properties": { "hard": { "id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/hard", "$ref": "#/definitions/uint64" }, "soft": { "id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/soft", "$ref": "#/definitions/uint64" }, "type": { "id": "https://opencontainers.org/schema/bundle/linux/rlimits/0/type", "type": "string", "pattern": "^RLIMIT_[A-Z]+$" } } } } } }, "resources": { "id": "https://opencontainers.org/schema/bundle/linux/resources", "type": "object", "properties": { "devices": { "id": "https://opencontainers.org/schema/bundle/linux/resources/devices", "type": "array", "items": { "$ref": "#/definitions/DeviceCgroup" } }, "pids": { "id": "https://opencontainers.org/schema/bundle/linux/resources/pids", "type": "object", "properties": { "limit": { "id": "https://opencontainers.org/schema/bundle/linux/resources/pids/limit", "$ref": "#/definitions/int64" } }, "required": [ "limit" ] }, "blockIO": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO", "type": "object", "properties": { "weight": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weight", "$ref": "#/definitions/weight" }, "leafWeight": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/leafWeight", "$ref": "#/definitions/weight" }, "throttleReadBpsDevice": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadBpsDevice", "type": "array", "items": { "$ref": "#/definitions/blockIODeviceThrottle" } }, "throttleWriteBpsDevice": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteBpsDevice", "type": "array", "items": { "$ref": "#/definitions/blockIODeviceThrottle" } }, "throttleReadIOPSDevice": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadIOPSDevice", "type": "array", "items": { "$ref": "#/definitions/blockIODeviceThrottle" } }, "throttleWriteIOPSDevice": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteIOPSDevice", "type": "array", "items": { "$ref": "#/definitions/blockIODeviceThrottle" } }, "weightDevice": { "id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weightDevice", "type": "array", "items": { "$ref": "#/definitions/blockIODeviceWeight" } } } }, "cpu": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu", "type": "object", "properties": { "cpus": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/cpus", "type": "string" }, "mems": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/mems", "type": "string" }, "period": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/period", "$ref": "#/definitions/uint64" }, "quota": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/quota", "$ref": "#/definitions/int64" }, "realtimePeriod": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimePeriod", "$ref": "#/definitions/uint64" }, "realtimeRuntime": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/realtimeRuntime", "$ref": "#/definitions/int64" }, "shares": { "id": "https://opencontainers.org/schema/bundle/linux/resources/cpu/shares", "$ref": "#/definitions/uint64" } } }, "hugepageLimits": { "id": "https://opencontainers.org/schema/bundle/linux/resources/hugepageLimits", "type": "array", "items": { "type": "object", "properties": { "pageSize": { "type": "string" }, "limit": { "$ref": "#/definitions/uint64" } }, "required": [ "pageSize", "limit" ] } }, "memory": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory", "type": "object", "properties": { "kernel": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernel", "$ref": "#/definitions/int64" }, "kernelTCP": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/kernelTCP", "$ref": "#/definitions/int64" }, "limit": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/limit", "$ref": "#/definitions/int64" }, "reservation": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/reservation", "$ref": "#/definitions/int64" }, "swap": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swap", "$ref": "#/definitions/int64" }, "swappiness": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/swappiness", "$ref": "#/definitions/uint64" }, "disableOOMKiller": { "id": "https://opencontainers.org/schema/bundle/linux/resources/memory/disableOOMKiller", "type": "boolean" } } }, "network": { "id": "https://opencontainers.org/schema/bundle/linux/resources/network", "type": "object", "properties": { "classID": { "id": "https://opencontainers.org/schema/bundle/linux/resources/network/classId", "$ref": "#/definitions/uint32" }, "priorities": { "id": "https://opencontainers.org/schema/bundle/linux/resources/network/priorities", "type": "array", "items": { "$ref": "#/definitions/NetworkInterfacePriority" } } } } } } } }