1
0
Fork 0
containerctl/containerrc.json
Enno Tensing ef63c0de14
containerrc: Remove optional parts from schema
A container can be created from a name and an image, no other part is
required. Reflect that in the JSON schema, by removing most top-level
required entries. Also remove the hardcoded env-vars from the schema.

Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-29 09:25:19 +02:00

143 lines
2.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"image": {
"type": "object",
"properties": {
"registry": {
"type": "string"
},
"image": {
"type": "string"
},
"tag": {
"type": "string"
}
},
"required": [
"registry",
"image",
"tag"
]
},
"privileged": {
"type": "boolean"
},
"read_only": {
"type": "boolean"
},
"replace": {
"type": "boolean"
},
"pull_policy": {
"type": "string"
},
"restart": {
"type": "string"
},
"network": {
"type": "object",
"properties": {
"mode": {
"type": "string"
},
"options": {
"type": "array",
"items": {}
}
},
"required": [
"mode",
"options"
]
},
"dns": {
"type": "object",
"properties": {
"search": {
"type": "string"
},
"servers": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"search",
"servers"
]
},
"ports": {
"type": "object",
"properties": {
"tcp": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"udp": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"tcp",
"udp"
]
},
"env": {
"type": "object"
}
},
"secrets": {
"type": "object"
},
"volumes": {
"type": "object"
},
"capabilities": {
"type": "object",
"properties": {
"add": {
"type": "array",
"items": [
{
"type": "string"
}
]
},
"drop": {
"type": "array",
"items": [
{
"type": "string"
}
]
}
},
"required": [
"add",
"drop"
]
}
},
"required": [
"name",
"image"
]
}