diff --git a/cli/compose/schema/bindata.go b/cli/compose/schema/bindata.go index f295006e..c0685fce 100644 --- a/cli/compose/schema/bindata.go +++ b/cli/compose/schema/bindata.go @@ -5,6 +5,7 @@ // data/config_schema_v3.2.json // data/config_schema_v3.3.json // data/config_schema_v3.4.json +// data/config_schema_v3.5.json // DO NOT EDIT! package schema @@ -172,6 +173,26 @@ func dataConfig_schema_v34Json() (*asset, error) { return a, nil } +var _dataConfig_schema_v35Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\xcf\x72\xdb\xbc\x11\xbf\xeb\x29\x38\xfc\xbe\x5b\x24\x3b\x33\x4d\x3b\xd3\xdc\x7a\xec\xa9\x3d\xd7\xa3\x70\x20\x70\x25\x21\x06\x01\x64\x01\xca\x56\x32\x7e\xf7\x0e\xff\x0a\x24\x41\x02\x94\xe8\xd8\x69\x73\xb2\x45\xee\x2e\xb0\x8b\xdd\xdf\xee\x02\xe0\x8f\x55\x14\xc5\x7f\x6a\x7a\x84\x8c\xc4\x9f\xa3\xf8\x68\x8c\xfa\x7c\x7f\xff\x55\x4b\xb1\xa9\x9e\xde\x49\x3c\xdc\xa7\x48\xf6\x66\xf3\xf1\xd3\x7d\xf5\xec\x8f\x78\x5d\xf0\xb1\xb4\x60\xa1\x52\xec\xd9\x21\xa9\xde\x24\xa7\xbf\xdc\xfd\xf5\xae\x60\xaf\x48\xcc\x59\x41\x41\x24\x77\x5f\x81\x9a\xea\x19\xc2\xb7\x9c\x21\x14\xcc\x0f\xf1\x09\x50\x33\x29\xe2\xed\x7a\x55\xbc\x53\x28\x15\xa0\x61\xa0\xe3\xcf\x51\x31\xb9\x28\x6a\x49\x9a\x07\x96\x58\x6d\x90\x89\x43\x5c\x3e\x7e\x29\x25\x44\x51\xac\x01\x4f\x8c\x5a\x12\xda\xa9\xfe\x71\x7f\x91\x7f\xdf\x92\xad\xfb\x52\xad\xc9\x96\xcf\x15\x31\x06\x50\xfc\x7b\x38\xb7\xf2\xf5\x97\x07\xb2\xf9\xfe\x8f\xcd\x7f\x3e\x6e\xfe\x7e\x97\x6c\xb6\x1f\xfe\xec\xbc\x2e\xec\x8b\xb0\xaf\x86\x4f\x61\xcf\x04\x33\x4c\x8a\x76\xfc\xb8\xa5\x7c\xa9\xff\x7b\x69\x07\x26\x69\x5a\x12\x13\xde\x19\x7b\x4f\xb8\x86\xae\xce\x02\xcc\x93\xc4\x47\x9f\xce\x2d\xd9\x1b\xe9\x5c\x8f\xef\xd0\xb9\xab\xce\x49\xf2\x3c\xf3\xae\x60\x43\xf5\x46\xca\x54\xc3\x2f\xb3\x7e\x1a\x28\x82\xf1\xbb\x6c\x45\xf5\x66\x1e\x5b\x0c\xbf\x8c\xc2\x15\x6a\xf8\x14\x6e\xa8\xde\x48\xe1\x6a\xf8\xdb\x14\x5e\x35\x4a\xbb\xe7\x18\x7f\x79\xde\x14\x7f\x5f\x4a\x99\x93\xf2\x2a\x29\xd6\xfc\x4a\x25\x3a\x98\xe7\x32\xa7\x0b\x73\xc6\xed\xd9\x1a\x74\xc4\x92\x29\x28\x2e\xcf\xe5\xcc\xdd\x36\xab\x08\x32\x10\x26\x6e\xcd\x14\x45\xf1\x2e\x67\x3c\xed\x5b\x5d\x0a\xf8\x57\x21\xe2\xc1\x7a\x18\x45\x3f\xfa\xf0\x6e\xc9\x29\xdf\x77\x7e\x8d\x3b\x45\xfb\x7e\x44\x97\xf6\x3d\x95\xc2\xc0\xb3\x29\x95\x9a\x1e\xba\x32\x81\xa4\x8f\x80\x7b\xc6\x21\x94\x83\x60\xe5\xe9\x23\x26\xe3\x4c\x9b\x44\x62\x92\x32\x6a\x9c\xfc\x9c\xec\x80\xdf\x24\x81\x12\x7a\x84\x64\x8f\x32\xf3\x4a\xd9\x27\x95\x26\xda\x29\xa8\x41\xf0\x40\xcd\x0d\xc1\x03\xb8\x2d\xdb\x23\x1e\x70\xfb\x63\xab\x65\xb5\x7e\x6d\x57\x0e\x81\x31\x25\x2a\x21\x69\xda\x99\x07\x41\x24\xe7\x78\x1d\xc5\xcc\x40\xa6\xdd\x0a\x45\x71\x2e\xd8\xb7\x1c\xfe\x59\x93\x18\xcc\xa1\x2f\x37\x45\xa9\x96\x17\x7c\x40\x99\xab\x44\x11\x2c\x02\x69\xda\xd8\x31\x95\x59\x46\xc4\x52\xd1\x35\x47\x8f\x00\xcb\x0f\x70\x3e\xb2\x43\xb6\x1e\xc3\x7e\xd5\x8e\xd6\x99\xd6\x88\x36\x7e\x7d\x86\x78\xe1\x47\x0c\x3f\x66\x14\x90\x2b\x73\xa4\xa1\x10\x30\x1d\x0a\x4e\xfa\x9c\xa5\xe1\xc4\x87\x39\xc4\x99\x4c\xbb\xf3\x16\x79\xb6\x03\x1c\x84\x64\x37\xb2\x86\xbf\xb7\x2b\xd7\x9b\xde\xea\x1b\xc2\x04\x60\x22\x48\xe6\xb3\x55\x4c\x11\x52\x10\x86\x11\x9e\x68\x05\xb4\x43\xde\xac\xd4\xc4\xca\xc4\x41\x90\x1c\x23\x1c\x98\x36\x78\x9e\x06\xa5\x17\x7b\x62\x29\x28\x10\xa9\x4e\xaa\x26\x64\x3e\x7a\xc6\x29\xb4\x1d\xc9\xa2\x30\x91\x8a\xa9\xac\x50\x89\x29\xf2\x42\x31\xb7\xb8\xc7\x98\x68\x20\x48\x8f\x57\xf2\xcb\x8c\x30\x11\xb2\xa8\x20\x0c\x9e\x95\x64\x15\x8c\xbd\x3b\x7c\x02\x71\x4a\x5a\xbf\x99\x6d\x06\x10\x27\x86\x52\x64\x0d\x48\x87\x65\x67\x8b\xff\x59\x49\x0d\xb7\x83\x63\xcd\xf1\xd0\x28\xbe\x6e\x63\x7a\xdb\xb5\x5e\xbc\x97\x98\x91\x62\xb2\xcd\xd8\x76\x0c\x77\x86\x1a\x7a\x9e\x6d\x40\x5b\x87\xa2\xaa\x25\x3c\xe1\x4c\x3c\x2e\xef\xe2\xf0\x6c\x90\x24\x47\xa9\xcd\x35\x05\x50\x7c\x04\xc2\xcd\x91\x1e\x81\x3e\x4e\xb0\xdb\x54\x1d\x6e\xa9\x4d\x88\x93\xb3\x8c\x1c\xfc\x44\x8a\xfa\x48\xae\x2e\xf4\xe2\x45\x8d\x6f\x89\x95\x87\x43\x41\x3a\xe6\x71\x83\xc6\xa1\x7e\xed\x2b\xb9\x53\x64\x27\xc0\xd0\x2a\x52\xaa\x4b\xbf\xd3\x7f\x19\x92\xcd\xbd\x0d\x62\x87\xf4\xcb\x5d\xd5\x1f\x4e\x44\x55\xf9\x1f\xe7\xf1\x76\x98\x32\x87\x49\xb3\xff\xa4\xa7\x61\x58\x9d\xdb\x59\x95\x8c\xd0\xa2\x9c\x45\xd0\x23\xeb\x7a\x21\xad\xeb\xf5\x64\x90\xf3\x2f\xb4\x03\xe2\x41\x62\x1d\x43\xea\xab\xda\x88\xf9\xed\x5b\xd0\xd2\x79\x7b\x7c\x8f\x36\x63\xd3\x0b\x9d\xe6\x65\xba\x7e\x17\x2b\xe9\x08\x67\x44\x83\x3f\xd8\x27\xfb\xb1\x56\x1a\x53\xa7\x4f\x81\x3e\xe1\xe2\xfd\xdb\x24\xef\x08\xeb\xa8\xcc\xf0\xd6\xcd\x23\xca\x2e\x51\x39\x77\x4e\x64\xeb\x2f\x5a\x5f\xb3\xb3\x54\xdd\xc2\xbb\x8b\x15\x25\x42\xd8\x01\xa6\x24\x9a\x9f\xd2\x0b\x5d\x70\xea\x92\xf0\xab\xc1\x87\xed\x51\x7f\xb9\x83\x98\x5e\xa7\xa7\x9a\x40\x29\x07\xb5\xa3\xa3\x62\xc2\xc0\xa1\x68\x65\xdc\x49\x20\xdf\x71\xa6\x8f\x90\xce\xe1\x41\x69\x24\x95\x3c\x2c\x30\x9c\xbb\x3f\xe1\xc1\x30\xd1\x5f\x5d\x55\x9b\x29\x64\x27\xc6\xe1\xd0\xd3\x78\x27\x25\x07\x22\x3a\x89\x02\x81\xa4\x89\x14\xfc\x1c\x40\xa9\x0d\x41\xef\xae\x84\x06\x9a\x23\x33\xe7\x44\x2a\xb3\x78\x55\xa8\x8f\x59\xa2\xd9\x77\xe8\xc6\xde\xc5\xeb\x6b\x41\xdb\xde\x84\x7a\x7b\xec\xd1\xef\xad\x88\xff\x9b\xad\x08\x7d\xd6\xd4\x5c\x57\x5b\x6b\x93\x32\x91\x48\x05\xc2\x1b\x1b\xda\x48\x95\x1c\x90\x50\x48\x14\x20\x93\x4e\x53\x74\x00\x36\xcd\x91\x14\xe3\x0f\xc5\x68\x76\x10\xc4\x8d\x3b\x16\xa9\xc9\xd4\xfe\xca\x4d\x00\x63\xfc\xc1\x9e\x73\x96\xb1\xf1\xa0\x71\x78\x6d\x40\xbd\x56\xd5\x6a\xee\x12\x6d\xa2\x3c\x0b\x82\xec\x89\x0e\x61\xba\x41\x08\xe8\x0c\x8e\x04\x67\xa4\x8e\x32\x30\xf7\x23\xf9\xc9\xd5\x37\x38\xe7\xd5\x39\x2d\x2f\xe5\xad\xeb\x89\x6c\x9d\xf4\xb3\x4a\xaf\xfe\x34\xb6\xa3\xd5\x8f\x3b\xa8\x72\xed\x6d\xe2\x4a\x1a\xa1\xa7\x1a\x90\x96\x74\x78\xec\x1b\xfd\x12\x08\xdd\x59\xa3\x92\xdc\xb1\x36\x01\x38\x5e\x8f\x14\x88\x9d\xaf\x8d\xfa\xc1\x15\x81\xc5\x43\xa5\xd0\x4c\x1b\x10\xd4\xbd\xbf\xea\x64\xda\xb1\xc1\xe1\xc5\xd0\x28\xd3\x7d\x57\x58\xd7\x55\x52\x91\x43\x85\xb7\xc1\x8d\x4e\x78\xac\xd6\x37\x02\x7e\x8a\x2a\x42\x52\xa9\x46\x96\x26\x5c\x8d\xb9\x69\xb6\xb7\x75\x31\x51\x87\x8e\x41\xc6\x93\xc4\xc7\x22\x21\xa5\xcc\x8d\x1c\xab\x1e\xcb\x8c\x3b\x05\xbd\xbd\xbe\x46\x80\xeb\x20\xdc\x26\xf5\x5e\x2e\x98\x3e\x94\xaf\x89\x46\x0f\xcc\x99\x26\xbb\xde\xb9\x84\x2b\xd1\x16\x99\x01\x4f\xee\x7c\xef\x2f\x18\x10\x0c\xb2\xde\x01\x43\x53\x4a\xd9\x19\x1f\xf4\xfb\xdc\x86\x37\x2c\x03\x99\x3b\xc1\x29\xa4\x5a\x22\x68\xe6\xd7\x5b\x2b\xdb\x4d\x6b\x79\xb1\x75\x7d\xc1\xe3\x42\x16\x65\xdf\x83\x1e\xac\xe3\xaa\x6a\x17\xc0\xeb\x26\x21\xe9\x11\x44\x5a\x1e\xa4\x04\xe5\x52\x04\xc5\x19\x25\xda\x57\xaf\xdc\xb0\xe7\x9c\xab\x94\x18\x48\xea\x5b\x32\x73\x2a\xc4\x89\xd2\x50\x11\x24\x9c\x03\x67\x3a\x0b\x29\xb5\xe2\x14\x38\x71\xe6\x1a\xaf\xdf\x94\xec\x7b\xc2\x78\x8e\x90\x10\x3a\x9a\x14\x7a\x1c\x99\x14\xcc\x48\x27\x78\x85\x0d\x99\x91\xe7\xa4\x19\xb6\x24\xf1\x44\x6d\xc9\x24\x31\x75\x97\x5a\xeb\xc2\x2f\xf2\xcc\x51\xec\x54\x71\xb1\xd9\x33\xd4\xa6\xea\x89\xa5\xaa\x7f\x75\x41\xfd\x65\x74\x9f\x21\x74\x6b\xda\xf2\xba\xaa\x2a\x99\xd7\x30\x4c\xb8\xc3\xa5\xfd\x18\xf1\xce\x66\xc4\x81\xc5\x10\x74\x01\xa8\xed\xc9\x81\x97\x7f\x51\x2b\x54\x90\x24\x39\xab\x0a\xa1\x25\x4c\x41\xa5\xa8\xe6\x11\xe2\xa5\x37\x86\x45\xe1\xa3\x45\x1b\x97\x29\xe3\x45\x90\x92\xe1\x89\x89\x54\x3e\xcd\x47\xdf\x05\xac\xad\x38\xa1\xd0\x43\xec\x5b\x0d\xad\x0d\x12\x26\xcc\xec\x13\xb5\xbe\x59\x14\xc2\x1e\x10\xc4\x30\x22\xa2\xe9\xce\x26\x1a\xef\x6e\x7c\xba\xf9\x35\xac\x29\xb4\x2a\x4a\xfc\x37\xd8\xd8\xbc\x75\xf1\x6f\xa8\x11\xdb\x70\xf7\x64\xf7\x96\xce\x5b\x1d\x8e\x65\x74\xaa\x72\xef\xe9\x5c\x06\x99\x9c\xbe\x89\x72\xc3\x65\x70\x9f\x8a\x0d\xd9\x02\xd5\x4b\xd0\x71\x6e\x4d\x95\x48\xb5\xfc\x7e\x92\xff\xc8\x76\xeb\xdf\xcd\x60\x8a\x64\x4b\x61\x48\xf0\x01\x77\xec\x2c\x9f\xa2\x77\x80\x0e\xf9\x4e\x84\x5d\xdd\x7c\x67\xe8\xd0\xbd\x3c\x52\xde\x4d\x19\x59\xd5\x87\xb6\x13\x5b\xb7\xb6\xda\x06\x2f\xf1\xe8\xc5\x90\xe5\xe6\x5f\x36\x85\xfd\x4d\x60\x57\xf7\x48\x8c\x21\xf4\x18\xd4\x68\xce\xac\xf7\x6f\xc0\xa1\xc1\x76\x88\x13\x86\x6a\xaa\x05\x50\x28\xe4\xa6\xce\xff\x06\x52\xfd\xea\x7e\xfd\xf3\x7c\xb0\xfe\x66\xc5\xfb\x5d\x44\x49\x75\x75\xae\x0f\xb8\x79\xfa\x0e\xd6\xec\x8d\x97\x62\x90\xe8\x9c\x4b\x51\x53\xfd\x5e\x8a\x57\x8d\x8a\xee\xa1\xa0\xb5\x24\xc3\xdd\xc0\x29\x4b\x06\xdf\x5c\xaa\x39\xb6\xdd\x69\xf4\xc9\x1c\x5f\x78\x76\x6b\x9f\xa9\x2b\x03\x0d\xc9\xc8\x9e\x74\x6f\xd0\xda\x88\xd3\x9a\x2f\x88\xfb\x77\x1f\x26\x2a\xbc\xa9\x1b\x86\xaf\x54\x1a\x2d\x70\x1d\xc3\xbd\xa6\xbd\xe6\xb9\xb1\xee\xf0\x03\xb5\xf1\xf8\x6f\xf8\x07\x9f\xab\x15\x7a\x8a\xf3\x60\xb7\xfa\x47\xf7\x00\xae\xfa\xd4\x6c\xdb\xb1\x4f\x8f\xa4\xba\xaf\x6b\x25\xda\xad\xbd\x9f\x30\xfa\x81\x81\xeb\x23\xb6\xfe\xf1\x5f\xf3\x31\xd9\xc8\x8d\x84\x95\xfd\xb7\xfc\x38\x70\xf5\xb2\xfa\x6f\x00\x00\x00\xff\xff\xc1\x11\xf5\xfb\x86\x3d\x00\x00") + +func dataConfig_schema_v35JsonBytes() ([]byte, error) { + return bindataRead( + _dataConfig_schema_v35Json, + "data/config_schema_v3.5.json", + ) +} + +func dataConfig_schema_v35Json() (*asset, error) { + bytes, err := dataConfig_schema_v35JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "data/config_schema_v3.5.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + // Asset loads and returns the asset for the given name. // It returns an error if the asset could not be found or // could not be loaded. @@ -229,6 +250,7 @@ var _bindata = map[string]func() (*asset, error){ "data/config_schema_v3.2.json": dataConfig_schema_v32Json, "data/config_schema_v3.3.json": dataConfig_schema_v33Json, "data/config_schema_v3.4.json": dataConfig_schema_v34Json, + "data/config_schema_v3.5.json": dataConfig_schema_v35Json, } // AssetDir returns the file names below a certain @@ -277,6 +299,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ "config_schema_v3.2.json": &bintree{dataConfig_schema_v32Json, map[string]*bintree{}}, "config_schema_v3.3.json": &bintree{dataConfig_schema_v33Json, map[string]*bintree{}}, "config_schema_v3.4.json": &bintree{dataConfig_schema_v34Json, map[string]*bintree{}}, + "config_schema_v3.5.json": &bintree{dataConfig_schema_v35Json, map[string]*bintree{}}, }}, }} diff --git a/cli/compose/schema/data/config_schema_v3.5.json b/cli/compose/schema/data/config_schema_v3.5.json new file mode 100644 index 00000000..b0ddd3c9 --- /dev/null +++ b/cli/compose/schema/data/config_schema_v3.5.json @@ -0,0 +1,543 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "config_schema_v3.5.json", + "type": "object", + "required": ["version"], + + "properties": { + "version": { + "type": "string" + }, + + "services": { + "id": "#/properties/services", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/service" + } + }, + "additionalProperties": false + }, + + "networks": { + "id": "#/properties/networks", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/network" + } + } + }, + + "volumes": { + "id": "#/properties/volumes", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/volume" + } + }, + "additionalProperties": false + }, + + "secrets": { + "id": "#/properties/secrets", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/secret" + } + }, + "additionalProperties": false + }, + + "configs": { + "id": "#/properties/configs", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "$ref": "#/definitions/config" + } + }, + "additionalProperties": false + } + }, + + "patternProperties": {"^x-": {}}, + "additionalProperties": false, + + "definitions": { + + "service": { + "id": "#/definitions/service", + "type": "object", + + "properties": { + "deploy": {"$ref": "#/definitions/deployment"}, + "build": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "context": {"type": "string"}, + "dockerfile": {"type": "string"}, + "args": {"$ref": "#/definitions/list_or_dict"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "cache_from": {"$ref": "#/definitions/list_of_strings"}, + "network": {"type": "string"}, + "target": {"type": "string"} + }, + "additionalProperties": false + } + ] + }, + "cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "cgroup_parent": {"type": "string"}, + "command": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "configs": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "source": {"type": "string"}, + "target": {"type": "string"}, + "uid": {"type": "string"}, + "gid": {"type": "string"}, + "mode": {"type": "number"} + } + } + ] + } + }, + "container_name": {"type": "string"}, + "credential_spec": {"type": "object", "properties": { + "file": {"type": "string"}, + "registry": {"type": "string"} + }}, + "depends_on": {"$ref": "#/definitions/list_of_strings"}, + "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "dns": {"$ref": "#/definitions/string_or_list"}, + "dns_search": {"$ref": "#/definitions/string_or_list"}, + "domainname": {"type": "string"}, + "entrypoint": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "env_file": {"$ref": "#/definitions/string_or_list"}, + "environment": {"$ref": "#/definitions/list_or_dict"}, + + "expose": { + "type": "array", + "items": { + "type": ["string", "number"], + "format": "expose" + }, + "uniqueItems": true + }, + + "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "extra_hosts": {"$ref": "#/definitions/list_or_dict"}, + "healthcheck": {"$ref": "#/definitions/healthcheck"}, + "hostname": {"type": "string"}, + "image": {"type": "string"}, + "ipc": {"type": "string"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + + "logging": { + "type": "object", + + "properties": { + "driver": {"type": "string"}, + "options": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number", "null"]} + } + } + }, + "additionalProperties": false + }, + + "mac_address": {"type": "string"}, + "network_mode": {"type": "string"}, + + "networks": { + "oneOf": [ + {"$ref": "#/definitions/list_of_strings"}, + { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9._-]+$": { + "oneOf": [ + { + "type": "object", + "properties": { + "aliases": {"$ref": "#/definitions/list_of_strings"}, + "ipv4_address": {"type": "string"}, + "ipv6_address": {"type": "string"} + }, + "additionalProperties": false + }, + {"type": "null"} + ] + } + }, + "additionalProperties": false + } + ] + }, + "pid": {"type": ["string", "null"]}, + + "ports": { + "type": "array", + "items": { + "oneOf": [ + {"type": "number", "format": "ports"}, + {"type": "string", "format": "ports"}, + { + "type": "object", + "properties": { + "mode": {"type": "string"}, + "target": {"type": "integer"}, + "published": {"type": "integer"}, + "protocol": {"type": "string"} + }, + "additionalProperties": false + } + ] + }, + "uniqueItems": true + }, + + "privileged": {"type": "boolean"}, + "read_only": {"type": "boolean"}, + "restart": {"type": "string"}, + "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "shm_size": {"type": ["number", "string"]}, + "secrets": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "properties": { + "source": {"type": "string"}, + "target": {"type": "string"}, + "uid": {"type": "string"}, + "gid": {"type": "string"}, + "mode": {"type": "number"} + } + } + ] + } + }, + "sysctls": {"$ref": "#/definitions/list_or_dict"}, + "stdin_open": {"type": "boolean"}, + "stop_grace_period": {"type": "string", "format": "duration"}, + "stop_signal": {"type": "string"}, + "tmpfs": {"$ref": "#/definitions/string_or_list"}, + "tty": {"type": "boolean"}, + "ulimits": { + "type": "object", + "patternProperties": { + "^[a-z]+$": { + "oneOf": [ + {"type": "integer"}, + { + "type":"object", + "properties": { + "hard": {"type": "integer"}, + "soft": {"type": "integer"} + }, + "required": ["soft", "hard"], + "additionalProperties": false + } + ] + } + } + }, + "user": {"type": "string"}, + "userns_mode": {"type": "string"}, + "volumes": { + "type": "array", + "items": { + "oneOf": [ + {"type": "string"}, + { + "type": "object", + "required": ["type"], + "properties": { + "type": {"type": "string"}, + "source": {"type": "string"}, + "target": {"type": "string"}, + "read_only": {"type": "boolean"}, + "consistency": {"type": "string"}, + "bind": { + "type": "object", + "properties": { + "propagation": {"type": "string"} + } + }, + "volume": { + "type": "object", + "properties": { + "nocopy": {"type": "boolean"} + } + } + } + } + ], + "uniqueItems": true + } + }, + "working_dir": {"type": "string"} + }, + "additionalProperties": false + }, + + "healthcheck": { + "id": "#/definitions/healthcheck", + "type": "object", + "additionalProperties": false, + "properties": { + "disable": {"type": "boolean"}, + "interval": {"type": "string", "format": "duration"}, + "retries": {"type": "number"}, + "test": { + "oneOf": [ + {"type": "string"}, + {"type": "array", "items": {"type": "string"}} + ] + }, + "timeout": {"type": "string", "format": "duration"}, + "start_period": {"type": "string", "format": "duration"} + } + }, + "deployment": { + "id": "#/definitions/deployment", + "type": ["object", "null"], + "properties": { + "mode": {"type": "string"}, + "endpoint_mode": {"type": "string"}, + "replicas": {"type": "integer"}, + "labels": {"$ref": "#/definitions/list_or_dict"}, + "update_config": { + "type": "object", + "properties": { + "parallelism": {"type": "integer"}, + "delay": {"type": "string", "format": "duration"}, + "failure_action": {"type": "string"}, + "monitor": {"type": "string", "format": "duration"}, + "max_failure_ratio": {"type": "number"}, + "order": {"type": "string", "enum": [ + "start-first", "stop-first" + ]} + }, + "additionalProperties": false + }, + "resources": { + "type": "object", + "properties": { + "limits": {"$ref": "#/definitions/resource"}, + "reservations": {"$ref": "#/definitions/resource"} + }, + "additionalProperties": false + }, + "restart_policy": { + "type": "object", + "properties": { + "condition": {"type": "string"}, + "delay": {"type": "string", "format": "duration"}, + "max_attempts": {"type": "integer"}, + "window": {"type": "string", "format": "duration"} + }, + "additionalProperties": false + }, + "placement": { + "type": "object", + "properties": { + "constraints": {"type": "array", "items": {"type": "string"}}, + "preferences": { + "type": "array", + "items": { + "type": "object", + "properties": { + "spread": {"type": "string"} + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + + "resource": { + "id": "#/definitions/resource", + "type": "object", + "properties": { + "cpus": {"type": "string"}, + "memory": {"type": "string"} + }, + "additionalProperties": false + }, + + "network": { + "id": "#/definitions/network", + "type": ["object", "null"], + "properties": { + "driver": {"type": "string"}, + "driver_opts": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number"]} + } + }, + "ipam": { + "type": "object", + "properties": { + "driver": {"type": "string"}, + "config": { + "type": "array", + "items": { + "type": "object", + "properties": { + "subnet": {"type": "string"} + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + }, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + }, + "additionalProperties": false + }, + "internal": {"type": "boolean"}, + "attachable": {"type": "boolean"}, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "additionalProperties": false + }, + + "volume": { + "id": "#/definitions/volume", + "type": ["object", "null"], + "properties": { + "name": {"type": "string"}, + "driver": {"type": "string"}, + "driver_opts": { + "type": "object", + "patternProperties": { + "^.+$": {"type": ["string", "number"]} + } + }, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + }, + "additionalProperties": false + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "additionalProperties": false + }, + + "secret": { + "id": "#/definitions/secret", + "type": "object", + "properties": { + "file": {"type": "string"}, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + } + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "additionalProperties": false + }, + + "config": { + "id": "#/definitions/config", + "type": "object", + "properties": { + "file": {"type": "string"}, + "external": { + "type": ["boolean", "object"], + "properties": { + "name": {"type": "string"} + } + }, + "labels": {"$ref": "#/definitions/list_or_dict"} + }, + "additionalProperties": false + }, + + "string_or_list": { + "oneOf": [ + {"type": "string"}, + {"$ref": "#/definitions/list_of_strings"} + ] + }, + + "list_of_strings": { + "type": "array", + "items": {"type": "string"}, + "uniqueItems": true + }, + + "list_or_dict": { + "oneOf": [ + { + "type": "object", + "patternProperties": { + ".+": { + "type": ["string", "number", "null"] + } + }, + "additionalProperties": false + }, + {"type": "array", "items": {"type": "string"}, "uniqueItems": true} + ] + }, + + "constraints": { + "service": { + "id": "#/definitions/constraints/service", + "anyOf": [ + {"required": ["build"]}, + {"required": ["image"]} + ], + "properties": { + "build": { + "required": ["context"] + } + } + } + } + } +}