{
    "additionalProperties": false,
    "definitions": {
        "blkio_limit": {
            "additionalProperties": false,
            "properties": {
                "path": {
                    "type": "string"
                },
                "rate": {
                    "type": [
                        "integer",
                        "string"
                    ]
                }
            },
            "type": "object"
        },
        "blkio_weight": {
            "additionalProperties": false,
            "properties": {
                "path": {
                    "type": "string"
                },
                "weight": {
                    "type": "integer"
                }
            },
            "type": "object"
        },
        "constraints": {
            "service": {
                "anyOf": [
                    {
                        "required": [
                            "build"
                        ]
                    },
                    {
                        "required": [
                            "image"
                        ]
                    }
                ],
                "id": "#/definitions/constraints/service",
                "properties": {
                    "build": {
                        "required": [
                            "context"
                        ]
                    }
                }
            }
        },
        "healthcheck": {
            "additionalProperties": false,
            "id": "#/definitions/healthcheck",
            "properties": {
                "disable": {
                    "type": "boolean"
                },
                "interval": {
                    "type": "string"
                },
                "retries": {
                    "type": "number"
                },
                "start_period": {
                    "type": "string"
                },
                "test": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "timeout": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "ipam_config": {
            "additionalProperties": false,
            "id": "#/definitions/ipam_config",
            "properties": {
                "aux_addresses": {
                    "additionalProperties": false,
                    "patternProperties": {
                        "^.+$": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "gateway": {
                    "type": "string"
                },
                "ip_range": {
                    "type": "string"
                },
                "subnet": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "labels": {
            "oneOf": [
                {
                    "additionalProperties": false,
                    "patternProperties": {
                        ".+": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                }
            ]
        },
        "list_of_strings": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "list_or_dict": {
            "oneOf": [
                {
                    "additionalProperties": false,
                    "patternProperties": {
                        ".+": {
                            "type": [
                                "string",
                                "number",
                                "null"
                            ]
                        }
                    },
                    "type": "object"
                },
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                }
            ]
        },
        "network": {
            "additionalProperties": false,
            "id": "#/definitions/network",
            "patternProperties": {
                "^x-": {}
            },
            "properties": {
                "driver": {
                    "type": "string"
                },
                "driver_opts": {
                    "patternProperties": {
                        "^.+$": {
                            "type": [
                                "string",
                                "number"
                            ]
                        }
                    },
                    "type": "object"
                },
                "enable_ipv6": {
                    "type": "boolean"
                },
                "external": {
                    "additionalProperties": false,
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    },
                    "type": [
                        "boolean",
                        "object"
                    ]
                },
                "internal": {
                    "type": "boolean"
                },
                "ipam": {
                    "additionalProperties": false,
                    "properties": {
                        "config": {
                            "items": {
                                "$ref": "#/definitions/ipam_config"
                            },
                            "type": "array"
                        },
                        "driver": {
                            "type": "string"
                        },
                        "options": {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^.+$": {
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "type": "object"
                },
                "labels": {
                    "$ref": "#/definitions/labels"
                },
                "name": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "service": {
            "additionalProperties": false,
            "dependencies": {
                "memswap_limit": [
                    "mem_limit"
                ]
            },
            "id": "#/definitions/service",
            "patternProperties": {
                "^x-": {}
            },
            "properties": {
                "blkio_config": {
                    "additionalProperties": false,
                    "properties": {
                        "device_read_bps": {
                            "items": {
                                "$ref": "#/definitions/blkio_limit"
                            },
                            "type": "array"
                        },
                        "device_read_iops": {
                            "items": {
                                "$ref": "#/definitions/blkio_limit"
                            },
                            "type": "array"
                        },
                        "device_write_bps": {
                            "items": {
                                "$ref": "#/definitions/blkio_limit"
                            },
                            "type": "array"
                        },
                        "device_write_iops": {
                            "items": {
                                "$ref": "#/definitions/blkio_limit"
                            },
                            "type": "array"
                        },
                        "weight": {
                            "type": "integer"
                        },
                        "weight_device": {
                            "items": {
                                "$ref": "#/definitions/blkio_weight"
                            },
                            "type": "array"
                        }
                    },
                    "type": "object"
                },
                "build": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "args": {
                                    "$ref": "#/definitions/list_or_dict"
                                },
                                "cache_from": {
                                    "$ref": "#/definitions/list_of_strings"
                                },
                                "context": {
                                    "type": "string"
                                },
                                "dockerfile": {
                                    "type": "string"
                                },
                                "extra_hosts": {
                                    "$ref": "#/definitions/list_or_dict"
                                },
                                "isolation": {
                                    "type": "string"
                                },
                                "labels": {
                                    "$ref": "#/definitions/labels"
                                },
                                "network": {
                                    "type": "string"
                                },
                                "shm_size": {
                                    "type": [
                                        "integer",
                                        "string"
                                    ]
                                },
                                "target": {
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "cap_add": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "cap_drop": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "cgroup_parent": {
                    "type": "string"
                },
                "command": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "container_name": {
                    "type": "string"
                },
                "cpu_count": {
                    "minimum": 0,
                    "type": "integer"
                },
                "cpu_percent": {
                    "maximum": 100,
                    "minimum": 0,
                    "type": "integer"
                },
                "cpu_period": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpu_quota": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpu_rt_period": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpu_rt_runtime": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpu_shares": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpus": {
                    "minimum": 0,
                    "type": "number"
                },
                "cpuset": {
                    "type": "string"
                },
                "depends_on": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/list_of_strings"
                        },
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "additionalProperties": false,
                                    "properties": {
                                        "condition": {
                                            "enum": [
                                                "service_started",
                                                "service_healthy"
                                            ],
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "condition"
                                    ],
                                    "type": "object"
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "device_cgroup_rules": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "devices": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "dns": {
                    "$ref": "#/definitions/string_or_list"
                },
                "dns_opt": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "dns_search": {
                    "$ref": "#/definitions/string_or_list"
                },
                "domainname": {
                    "type": "string"
                },
                "entrypoint": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "env_file": {
                    "$ref": "#/definitions/string_or_list"
                },
                "environment": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "expose": {
                    "items": {
                        "format": "expose",
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "extends": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "additionalProperties": false,
                            "properties": {
                                "file": {
                                    "type": "string"
                                },
                                "service": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "service"
                            ],
                            "type": "object"
                        }
                    ]
                },
                "external_links": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "extra_hosts": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "group_add": {
                    "items": {
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "healthcheck": {
                    "$ref": "#/definitions/healthcheck"
                },
                "hostname": {
                    "type": "string"
                },
                "image": {
                    "type": "string"
                },
                "init": {
                    "type": [
                        "boolean",
                        "string"
                    ]
                },
                "ipc": {
                    "type": "string"
                },
                "isolation": {
                    "type": "string"
                },
                "labels": {
                    "$ref": "#/definitions/labels"
                },
                "links": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "logging": {
                    "additionalProperties": false,
                    "properties": {
                        "driver": {
                            "type": "string"
                        },
                        "options": {
                            "type": "object"
                        }
                    },
                    "type": "object"
                },
                "mac_address": {
                    "type": "string"
                },
                "mem_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "mem_reservation": {
                    "type": [
                        "string",
                        "integer"
                    ]
                },
                "mem_swappiness": {
                    "type": "integer"
                },
                "memswap_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "network_mode": {
                    "type": "string"
                },
                "networks": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/list_of_strings"
                        },
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                "^[a-zA-Z0-9._-]+$": {
                                    "oneOf": [
                                        {
                                            "additionalProperties": false,
                                            "properties": {
                                                "aliases": {
                                                    "$ref": "#/definitions/list_of_strings"
                                                },
                                                "ipv4_address": {
                                                    "type": "string"
                                                },
                                                "ipv6_address": {
                                                    "type": "string"
                                                },
                                                "link_local_ips": {
                                                    "$ref": "#/definitions/list_of_strings"
                                                },
                                                "priority": {
                                                    "type": "number"
                                                }
                                            },
                                            "type": "object"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            },
                            "type": "object"
                        }
                    ]
                },
                "oom_kill_disable": {
                    "type": "boolean"
                },
                "oom_score_adj": {
                    "maximum": 1000,
                    "minimum": -1000,
                    "type": "integer"
                },
                "pid": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "pids_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "platform": {
                    "type": "string"
                },
                "ports": {
                    "items": {
                        "format": "ports",
                        "type": [
                            "string",
                            "number"
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "privileged": {
                    "type": "boolean"
                },
                "read_only": {
                    "type": "boolean"
                },
                "restart": {
                    "type": "string"
                },
                "runtime": {
                    "type": "string"
                },
                "scale": {
                    "type": "integer"
                },
                "security_opt": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "shm_size": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "stdin_open": {
                    "type": "boolean"
                },
                "stop_grace_period": {
                    "_format": "duration",
                    "type": "string"
                },
                "stop_signal": {
                    "type": "string"
                },
                "storage_opt": {
                    "type": "object"
                },
                "sysctls": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "tmpfs": {
                    "$ref": "#/definitions/string_or_list"
                },
                "tty": {
                    "type": "boolean"
                },
                "ulimits": {
                    "patternProperties": {
                        "^[a-z]+$": {
                            "oneOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "additionalProperties": false,
                                    "properties": {
                                        "hard": {
                                            "type": "integer"
                                        },
                                        "soft": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "soft",
                                        "hard"
                                    ],
                                    "type": "object"
                                }
                            ]
                        }
                    },
                    "type": "object"
                },
                "user": {
                    "type": "string"
                },
                "userns_mode": {
                    "type": "string"
                },
                "volume_driver": {
                    "type": "string"
                },
                "volumes": {
                    "items": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "additionalProperties": false,
                                "properties": {
                                    "bind": {
                                        "properties": {
                                            "propagation": {
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "consistency": {
                                        "type": "string"
                                    },
                                    "read_only": {
                                        "type": "boolean"
                                    },
                                    "source": {
                                        "type": "string"
                                    },
                                    "target": {
                                        "type": "string"
                                    },
                                    "tmpfs": {
                                        "properties": {
                                            "size": {
                                                "type": [
                                                    "integer",
                                                    "string"
                                                ]
                                            }
                                        },
                                        "type": "object"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "volume": {
                                        "properties": {
                                            "nocopy": {
                                                "type": "boolean"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "type"
                                ],
                                "type": "object"
                            }
                        ],
                        "_uniqueItems": true
                    },
                    "type": "array"
                },
                "volumes_from": {
                    "$ref": "#/definitions/list_of_strings"
                },
                "working_dir": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "string_or_list": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "$ref": "#/definitions/list_of_strings"
                }
            ]
        },
        "volume": {
            "additionalProperties": false,
            "id": "#/definitions/volume",
            "patternProperties": {
                "^x-": {}
            },
            "properties": {
                "driver": {
                    "type": "string"
                },
                "driver_opts": {
                    "patternProperties": {
                        "^.+$": {
                            "type": [
                                "string",
                                "number"
                            ]
                        }
                    },
                    "type": "object"
                },
                "external": {
                    "additionalProperties": false,
                    "properties": {
                        "name": {
                            "type": "string"
                        }
                    },
                    "type": [
                        "boolean",
                        "object"
                    ]
                },
                "labels": {
                    "$ref": "#/definitions/labels"
                },
                "name": {
                    "type": "string"
                }
            },
            "type": [
                "object",
                "null"
            ]
        }
    },
    "patternProperties": {
        "^x-": {}
    },
    "properties": {
        "networks": {
            "id": "#/properties/networks",
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/network"
                }
            },
            "type": "object"
        },
        "services": {
            "additionalProperties": false,
            "id": "#/properties/services",
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/service"
                }
            },
            "type": "object"
        },
        "version": {
            "type": "string"
        },
        "volumes": {
            "additionalProperties": false,
            "id": "#/properties/volumes",
            "patternProperties": {
                "^[a-zA-Z0-9._-]+$": {
                    "$ref": "#/definitions/volume"
                }
            },
            "type": "object"
        }
    },
    "type": "object"
}