From 2b8cc52409ac8cf5f2629d704996374c3280f7b5 Mon Sep 17 00:00:00 2001 From: Ethan Haynes Date: Tue, 16 Jan 2018 10:44:08 -0600 Subject: [PATCH] adding config_schema_v3.6.json and updating binary Signed-off-by: Ethan Haynes --- cli/compose/schema/bindata.go | 23 + .../schema/data/config_schema_v3.6.json | 573 ++++++++++++++++++ 2 files changed, 596 insertions(+) create mode 100644 cli/compose/schema/data/config_schema_v3.6.json diff --git a/cli/compose/schema/bindata.go b/cli/compose/schema/bindata.go index f51ed9f043..c7a5dc7a51 100644 --- a/cli/compose/schema/bindata.go +++ b/cli/compose/schema/bindata.go @@ -6,6 +6,7 @@ // data/config_schema_v3.3.json // data/config_schema_v3.4.json // data/config_schema_v3.5.json +// data/config_schema_v3.6.json // DO NOT EDIT! package schema @@ -193,6 +194,26 @@ func dataConfig_schema_v35Json() (*asset, error) { return a, nil } +var _dataConfig_schema_v36Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x1b\xcb\x72\xe3\xb8\xf1\xae\xaf\x60\x61\xf7\xb6\x7e\x6c\x55\x36\xa9\xca\xdc\x72\xcc\x29\x39\xc7\xa5\x61\x41\x60\x4b\xc2\x1a\x04\xb0\x0d\x50\x63\xed\x94\xff\x3d\xc5\x87\x28\x90\x04\x08\x50\x92\xc7\x9e\xda\x39\xd9\x22\xbb\x1b\xfd\x42\xbf\x00\x7e\x5d\x65\x19\xf9\xd9\xb0\x3d\x94\x94\x7c\xca\xc8\xde\x5a\xfd\xe9\xf1\xf1\x77\xa3\xe4\x7d\xfb\xf4\x41\xe1\xee\xb1\x40\xba\xb5\xf7\xbf\xfe\xf6\xd8\x3e\xfb\x89\xdc\xd5\x78\xbc\xa8\x51\x98\x92\x5b\xbe\xcb\xdb\x37\xf9\xe1\x6f\x0f\x7f\x7f\xa8\xd1\x5b\x10\x7b\xd4\x50\x03\xa9\xcd\xef\xc0\x6c\xfb\x0c\xe1\x8f\x8a\x23\xd4\xc8\x4f\xe4\x00\x68\xb8\x92\x64\x7d\xb7\xaa\xdf\x69\x54\x1a\xd0\x72\x30\xe4\x53\x56\x33\x97\x65\x3d\xc8\xe9\x81\x43\xd6\x58\xe4\x72\x47\x9a\xc7\xaf\x0d\x85\x2c\x23\x06\xf0\xc0\x99\x43\xa1\x67\xf5\xa7\xc7\x33\xfd\xc7\x1e\xec\x6e\x4c\xd5\x61\xb6\x79\xae\xa9\xb5\x80\xf2\xbf\x53\xde\x9a\xd7\x9f\x9f\xe8\xfd\x9f\xff\xba\xff\xdf\xaf\xf7\xff\x7c\xc8\xef\xd7\xbf\xfc\x3c\x78\x5d\xeb\x17\x61\xdb\x2e\x5f\xc0\x96\x4b\x6e\xb9\x92\xfd\xfa\xa4\x87\x7c\xed\xfe\x7b\xed\x17\xa6\x45\xd1\x00\x53\x31\x58\x7b\x4b\x85\x81\xa1\xcc\x12\xec\x17\x85\xcf\x31\x99\x7b\xb0\x77\x92\xb9\x5b\xdf\x23\xf3\x50\x9c\x83\x12\x55\x19\xb5\xe0\x09\xea\x9d\x84\x69\x97\xbf\x8d\xfd\x0c\x30\x04\x1b\x77\xd9\x16\xea\xdd\x3c\xb6\x5e\xfe\x36\x02\xb7\x51\x23\x26\xf0\x09\xea\x9d\x04\x6e\x97\xbf\x4e\xe0\xd5\x49\x68\x3f\x8f\xe4\xf3\xcb\x7d\xfd\xf7\xb5\xa1\x39\x4b\xaf\xa5\xe2\xf0\xd7\x08\x31\x88\x79\x3e\x75\xfa\x62\x4e\x58\x9f\xbd\x42\x03\x9a\x2c\x40\x0b\x75\x6c\x38\xf7\xeb\xac\x05\x28\x41\x5a\xd2\xab\x29\xcb\xc8\xa6\xe2\xa2\x18\x6b\x5d\x49\xf8\x4f\x4d\xe2\xc9\x79\x98\x65\x5f\xc7\xe1\xdd\xa1\xd3\xbc\x1f\xfc\x0a\x3b\x45\xff\x3e\x20\x4b\xff\x9e\x29\x69\xe1\xc5\x36\x42\xcd\x2f\xdd\xaa\x40\xb1\x67\xc0\x2d\x17\x90\x8a\x41\xb1\xf5\xf4\x80\xca\x04\x37\x36\x57\x98\x17\x9c\x59\x2f\xbe\xa0\x1b\x10\x57\x51\x60\x94\xed\x21\xdf\xa2\x2a\xa3\x54\xb6\x79\x2b\x89\xf1\x12\x3a\x45\xf0\x44\xc9\x2d\xc5\x1d\x24\x6b\xd6\xec\xcb\xdc\xf0\x3f\x07\x7a\x7d\x22\x5c\x5a\xd8\x01\x92\xbb\x1e\x77\xfd\x3a\xc2\x9d\x10\x8b\x6f\xcc\x1e\xd5\xf9\xb5\x5e\x79\x08\x12\x46\x75\x4e\x8b\x62\x20\x04\x45\xa4\xc7\x9a\x23\x6e\xa1\x34\x7e\xf9\x32\x52\x49\xfe\x47\x05\xff\xee\x40\x2c\x56\x30\xa6\x5b\xa0\xd2\xb7\x27\xbc\x43\x55\xe9\x5c\x53\xac\x77\xe1\xbc\xee\x09\x53\x65\x49\xe5\xad\xb6\xe6\x12\x39\x12\x34\x3f\x49\x12\x99\xbb\xdf\xbb\x35\xdc\x57\xfd\x6a\x03\xb6\x02\xd2\xc4\xe5\x99\x06\x9b\x78\xb8\x89\x07\x9c\xda\xd3\x55\x85\x2c\x35\x7e\x2c\xdd\x47\x59\x46\x2a\x5e\xa4\x03\xef\x96\x00\x97\xaa\x18\xf2\x2d\xab\x72\x03\x48\xc6\x5b\x72\xb8\xb3\xa6\xbf\xd7\x2b\xdf\x9b\x91\xf5\x2d\xe5\x12\x30\x97\xb4\x8c\xe9\x8a\x30\x84\x02\xa4\xe5\x54\xe4\x46\x03\x1b\x80\x9f\x2c\x35\x63\x19\x92\x14\xcf\x09\xc2\x8e\x1b\x8b\x47\x2f\xe4\x59\x0a\x97\xb1\x02\x34\xc8\xc2\xe4\x6d\x07\xb3\x3c\xf4\x92\x02\xfa\x76\xe6\xa6\x61\xa2\x90\x73\x29\xa5\x25\x53\x27\x95\x9a\x37\x32\x42\xcc\x0d\x50\x64\xfb\x0b\xf1\x55\x49\xb9\x4c\x31\x2a\x48\x8b\x47\xad\x78\x1b\xc6\x3e\x5c\x7c\x02\x79\xc8\x7b\xbf\x59\xac\x06\x90\x07\x8e\x4a\x96\xa7\x20\x9d\x96\xda\x1d\xfc\x17\xad\x0c\x5c\x1f\x1c\xfb\x44\xdb\x09\x7e\xd7\xef\xe9\xf5\x50\x7b\x64\xab\xb0\xa4\x35\xb3\xa7\xb5\xdd\x3d\x3c\x58\x6a\xea\x79\xae\x02\x5d\x19\xea\x92\x98\x8a\x5c\x70\xf9\x7c\x7b\x17\x87\x17\x8b\x34\xdf\x2b\x63\x2f\xa9\x9e\xc8\x1e\xa8\xb0\x7b\xb6\x07\xf6\x3c\x83\xee\x42\x0d\xb0\x95\xb1\x29\x4e\xce\x4b\xba\x8b\x03\x69\x16\x05\x31\x4a\x50\xdb\x4d\x4a\xe6\x00\x2f\x2e\x27\xc9\x4d\xad\xe4\x90\x55\xbb\x5d\x0d\x1a\x72\xcd\x49\x7b\xd2\xbd\x8e\x15\xf6\x05\xf2\x03\x60\x6a\xf5\xa9\xf4\xb9\xab\x1a\xbf\x4c\x49\xfb\xd1\x36\x74\x00\xfa\xf9\xa1\xed\x42\x67\xb6\x5f\xf3\x9f\x10\xd3\x72\x37\xf3\x64\xd7\xf1\x93\x91\x84\x69\x05\xf1\xc0\x2a\x25\x65\x75\xdd\x8b\x60\x02\x76\x3d\x83\x76\x5d\x41\x3e\x29\x0e\xce\xb0\x13\xe0\x49\x06\x0e\x85\xf4\x8b\x9a\x95\xe5\x4d\x62\x92\xe9\xa2\x93\x84\x88\x34\x21\xf6\x52\xd9\x3c\xb3\x1b\x77\xb1\x06\x8e\x0a\x4e\x0d\xc4\x37\xfb\x6c\xd7\xd7\x53\xe3\xfa\xf0\x5b\xa2\x4f\xf8\x70\xff\x31\x8b\x1b\x40\x0d\xd2\x4c\xef\xf1\x22\xa4\xdc\x5a\x56\x08\x2f\x23\xeb\x78\x75\xfb\x96\x2d\xa8\x1e\x56\xe8\xc3\x58\xd1\x44\x08\x77\x83\x69\x85\xf6\x9b\x34\x4d\xe7\x38\x75\xae\x0c\xda\xc5\xa7\x7d\xd4\xd8\xdc\x49\x48\x6f\xd3\x7c\xcd\x44\x29\x0f\xb4\xa7\xf5\x3a\x4d\x24\xfc\x08\xba\xda\x08\x6e\xf6\x50\x2c\xc1\x41\x65\x15\x53\x22\x6d\x63\x78\x67\x4c\xe9\x9b\x61\xa6\x11\xbb\xa8\x88\xd3\xc8\x0f\x5c\xc0\x6e\x24\xf1\x46\x29\x01\x54\x0e\x12\x05\x02\x2d\x72\x25\xc5\x31\x01\xd2\x58\x8a\xd1\xf1\x85\x01\x56\x21\xb7\xc7\x5c\x69\x7b\xf3\xf2\xd1\x3f\x8f\x3a\x7b\x7d\x3f\x8e\x1a\x32\x34\x9a\xe4\x67\x3f\x66\x16\x7f\x99\x99\x85\x39\x1a\x66\x2f\xab\xad\x8d\x2d\xb8\xcc\x95\x06\x19\xdd\x1b\xc6\x2a\x9d\xef\x90\x32\xc8\x35\x20\x57\x5e\x55\x0c\x02\x6c\x51\x61\xdb\x1a\x4c\xc8\x18\xbe\x93\xd4\x1f\x77\x1c\x50\x5b\xea\xed\x85\xd3\x02\x6b\xe3\x9b\xbd\x12\xbc\xe4\xe1\x4d\xe3\xf1\xda\x84\x7a\xad\xad\xd5\xfc\x25\xda\x4c\x79\x96\x14\xb2\x67\x3a\x84\xf9\x06\x21\xa1\x33\xd8\x53\x5c\x90\x3a\x9a\x8d\xb9\x0d\xe4\x27\x5f\xdf\xe0\xe5\x6b\x70\x26\xdf\xd0\xbb\xeb\x18\x59\x7b\xe1\x17\x95\x5e\x63\x36\xd6\xc1\xea\xc7\xbf\xa9\x2a\x13\x6d\xe2\x1a\x18\x69\xe6\x1a\x90\x1e\x74\x7a\xb8\x9c\x7d\x17\x11\x7a\x60\xa3\x06\xdc\x63\x9b\x84\x38\xde\xad\x94\x18\x3b\xdf\x3a\xea\x27\x57\x04\x0e\x0e\x53\xd2\x70\x63\x41\x32\xff\x20\xd6\x8b\xb4\xe1\x93\x53\x8e\xa9\x52\xe6\xfb\xae\xb4\xae\xab\x81\xa2\xbb\xf0\x28\xc6\xdf\x9b\x24\xef\xd5\xee\xde\xc1\x37\x11\x45\x2a\xa6\x74\xc0\x34\xe9\x62\xbc\x71\x01\x3b\x9a\x74\xcc\x94\xad\xa1\x08\xf3\x45\xe1\x73\x9d\xbf\x0a\xee\x0f\x34\xab\x11\xca\x82\x8b\x0e\xa3\x19\xe2\x89\x80\xef\x74\xde\x05\x8d\xde\x78\x98\xbf\x29\xd0\x01\x05\x4f\xf1\xb9\xa1\x9b\xd1\x79\x87\x2f\x2f\xd7\x89\x04\x0f\xfe\xf2\x20\x5e\x5f\x20\x58\xe4\xa3\x83\x8b\x53\xe5\xe5\x16\x08\x60\x3e\xe6\x78\xdf\xf2\x12\x54\xe5\x8d\x65\x29\xc5\x15\x45\xbb\xbc\x3c\x5b\xb9\x6e\xda\xd1\x23\xce\x9d\x8a\x88\x0b\x39\x90\x63\x0f\x7a\x72\x8e\xc1\xda\xa1\x41\xd4\x4d\x52\xb2\x29\xc8\xa2\x39\xa0\x49\x4a\xbd\x08\x5a\x70\x46\x4d\xac\xbc\xb9\x62\x44\x5d\xe9\x82\x5a\xc8\xbb\xab\x3b\x4b\x0a\xca\x99\x4a\x52\x53\xa4\x42\x80\xe0\xa6\x4c\xa9\xcc\x48\x01\x82\x7a\x53\x53\xd4\x6f\x1a\xf4\x2d\xe5\xa2\x42\xc8\x29\x4b\x18\xe7\x77\x96\x92\xdc\x2a\x6f\xf0\x4a\x5b\xb2\xa4\x2f\xf9\x69\xd9\x06\x24\xb2\x6b\x1b\x24\x85\x85\xbf\x32\xbb\xab\xfd\xa2\x2a\x3d\xb5\x51\xbb\x2f\xee\xb7\x1c\x8d\x6d\x5b\x68\xa5\xbb\x5f\xc3\xa0\xfe\x1a\x1c\x4b\xa4\x4e\xb2\x1d\xaf\x6b\x8b\x98\x65\xfd\xc5\x8c\x3b\x78\xbb\x95\x18\xc5\x18\xd5\xe6\x3d\xd3\x55\xea\x60\x95\x94\x50\xaa\xd8\x49\xb4\x47\x7f\xe9\x3a\xf4\xa0\xd6\xba\xac\x33\x42\xe8\xa4\xe4\xa3\x28\xc0\x03\xbd\x03\x09\xc8\x59\x3e\xf0\x86\x40\x74\x99\xc2\xbe\xd1\xb8\xf7\x7a\xcf\x6e\xd3\x8c\x12\xbc\xad\x85\x6f\xe1\xde\x4c\xc9\x96\x8f\x94\xc8\x73\x65\xa8\xab\xe3\x4e\xdd\xc9\x97\xda\x46\xb3\x42\x83\xf0\x85\xcb\x42\x7d\x59\x9e\x51\x6f\xa0\x6d\x2d\x28\x83\x51\x16\xbe\x56\xd1\xc6\x22\xe5\xd2\x2e\x3e\x54\x1d\xab\x45\x23\x6c\x01\x41\x4e\xa3\x5c\x36\xdf\xdc\x66\xe1\x06\x37\x26\x5b\x5c\xc2\x0e\xc2\xe8\xba\xcb\x7b\x87\xd9\xf6\xb5\xc6\xbf\xa2\xee\xf7\x86\x9b\xb9\xd2\x6d\x8a\x30\xe9\x01\x86\xd6\xf3\x58\x2d\x6c\xad\x99\x9b\x4f\x05\x37\x0c\xc1\x42\xbf\x72\x7f\x81\x6a\xe8\x62\xb3\x9e\x30\xef\x05\xe4\xb9\x6b\xbe\xa3\x81\x9a\x1c\xa8\xa8\x12\x86\xb5\x17\x1d\x6f\x87\xda\xbf\x04\xe4\xd1\x07\x0a\xce\x35\xd8\x39\x9b\x9e\xc0\x6e\x50\x8b\xa7\xdc\x24\x49\xba\xef\xd0\x41\xe5\x4a\xdf\x7e\xe0\x1a\xbf\xd3\xb0\x8e\x8f\xfb\xb8\xa6\xe5\xad\x22\x6c\xf2\x0d\x10\xe2\x6d\x18\xb2\x0f\x10\x3b\xab\x8d\x0c\xcc\xd3\x3e\x76\xec\x74\x7b\xc4\xee\x96\x57\xc0\xaa\x4f\xfd\xec\xe1\xae\xd7\xd5\x3a\xd9\xc4\xc1\x8d\x71\x3b\xfe\x9b\x31\xc8\xf8\x94\xc4\x37\x2f\xa1\xd6\x52\xb6\x4f\x1a\xad\x2c\xec\x70\xaf\xc8\x44\x93\x79\xa1\x37\x54\x75\x50\x3f\x22\xd5\x82\x48\xf5\xbd\xfb\xf5\xb7\xf3\xc1\xee\xd3\xb1\xe8\xe7\x49\x0d\x54\x74\xf6\x79\x8d\xe7\x25\xdc\xf3\xfe\x00\x76\x7d\x67\x73\x4d\x92\xa1\xd7\x5c\x1d\xd4\x0f\x73\xbd\xb7\xb9\x46\xa7\xef\x8e\xd9\xa6\x73\xf4\x39\x4d\x26\x5f\x11\xec\x30\xd6\x43\x36\xc6\x60\x9e\x0f\xb6\x43\x1d\x4c\x90\xa9\xd0\x69\xce\x68\xd1\x4e\x89\xf3\x92\xdf\x30\x7f\x3c\xfc\x32\x53\x29\xce\x5d\xe5\x7d\xa3\x12\xeb\x06\xf7\x9e\xfc\x36\x1d\x8d\x28\x4e\xda\x9d\x7e\x6f\x1a\x8e\x11\x27\xfc\xc9\xd7\xa7\xb5\x9c\xf2\x38\x39\xe7\xf9\x3a\x3c\xe9\x6e\xbf\x1c\x5d\x0f\xf4\x33\x02\x69\x6f\xd0\x3b\x09\x7b\x9d\xd4\xf8\xfa\xbe\x49\x1d\x9f\xb3\x9f\xbe\x0d\x0d\x5c\xfd\x59\xb9\x7f\x9b\x6f\x7d\x57\xaf\xab\xff\x07\x00\x00\xff\xff\xfe\x67\x55\x11\x55\x41\x00\x00") + +func dataConfig_schema_v36JsonBytes() ([]byte, error) { + return bindataRead( + _dataConfig_schema_v36Json, + "data/config_schema_v3.6.json", + ) +} + +func dataConfig_schema_v36Json() (*asset, error) { + bytes, err := dataConfig_schema_v36JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "data/config_schema_v3.6.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. @@ -251,6 +272,7 @@ var _bindata = map[string]func() (*asset, error){ "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, + "data/config_schema_v3.6.json": dataConfig_schema_v36Json, } // AssetDir returns the file names below a certain @@ -300,6 +322,7 @@ var _bintree = &bintree{nil, 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{}}, + "config_schema_v3.6.json": &bintree{dataConfig_schema_v36Json, map[string]*bintree{}}, }}, }} diff --git a/cli/compose/schema/data/config_schema_v3.6.json b/cli/compose/schema/data/config_schema_v3.6.json new file mode 100644 index 0000000000..4244e102a4 --- /dev/null +++ b/cli/compose/schema/data/config_schema_v3.6.json @@ -0,0 +1,573 @@ +{ + "$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"}, + "shm_size": {"type": ["integer", "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"}, + "isolation": {"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"} + } + } + }, + "additionalProperties": false + } + ], + "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": { + "type": "object", + "properties": { + "cpus": {"type": "string"}, + "memory": {"type": "string"} + }, + "additionalProperties": false + }, + "reservations": { + "type": "object", + "properties": { + "cpus": {"type": "string"}, + "memory": {"type": "string"}, + "generic_resources": {"$ref": "#/definitions/generic_resources"} + }, + "additionalProperties": false + } + }, + "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 + }, + + "generic_resources": { + "id": "#/definitions/generic_resources", + "type": "array", + "items": { + "type": "object", + "properties": { + "discrete_resource_spec": { + "type": "object", + "properties": { + "kind": {"type": "string"}, + "value": {"type": "number"} + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + + "network": { + "id": "#/definitions/network", + "type": ["object", "null"], + "properties": { + "name": {"type": "string"}, + "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": { + "name": {"type": "string"}, + "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": { + "name": {"type": "string"}, + "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"] + } + } + } + } + } +}