{
    "additionalProperties": false,
    "definitions": {
        "list_of_strings": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "list_or_dict": {
            "oneOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                {
                    "type": "object"
                }
            ]
        },
        "service": {
            "additionalProperties": false,
            "dependencies": {
                "memswap_limit": [
                    "mem_limit"
                ]
            },
            "id": "#/definitions/service",
            "properties": {
                "build": {
                    "type": "string"
                },
                "cap_add": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "cap_drop": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "cgroup_parent": {
                    "type": "string"
                },
                "command": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    ]
                },
                "container_name": {
                    "type": "string"
                },
                "cpu_shares": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "cpuset": {
                    "type": "string"
                },
                "devices": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "dns": {
                    "$ref": "#/definitions/string_or_list"
                },
                "dns_search": {
                    "$ref": "#/definitions/string_or_list"
                },
                "dockerfile": {
                    "type": "string"
                },
                "domainname": {
                    "type": "string"
                },
                "entrypoint": {
                    "$ref": "#/definitions/string_or_list"
                },
                "env_file": {
                    "$ref": "#/definitions/string_or_list"
                },
                "environment": {
                    "oneOf": [
                        {
                            "additionalProperties": false,
                            "patternProperties": {
                                ".+": {
                                    "format": "environment",
                                    "type": [
                                        "string",
                                        "number",
                                        "boolean",
                                        "null"
                                    ]
                                }
                            },
                            "type": "object"
                        },
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array",
                            "_uniqueItems": true
                        }
                    ]
                },
                "expose": {
                    "items": {
                        "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": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "extra_hosts": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "hostname": {
                    "type": "string"
                },
                "image": {
                    "type": "string"
                },
                "ipc": {
                    "type": "string"
                },
                "labels": {
                    "$ref": "#/definitions/list_or_dict"
                },
                "links": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "log_driver": {
                    "type": "string"
                },
                "log_opt": {
                    "type": "object"
                },
                "mac_address": {
                    "type": "string"
                },
                "mem_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "memswap_limit": {
                    "type": [
                        "number",
                        "string"
                    ]
                },
                "net": {
                    "type": "string"
                },
                "pid": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "ports": {
                    "items": {
                        "oneOf": [
                            {
                                "_format": "ports",
                                "type": "string"
                            },
                            {
                                "format": "ports",
                                "type": "number"
                            }
                        ]
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "privileged": {
                    "type": "boolean"
                },
                "read_only": {
                    "type": "boolean"
                },
                "restart": {
                    "type": "string"
                },
                "security_opt": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "stdin_open": {
                    "type": "boolean"
                },
                "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"
                },
                "volume_driver": {
                    "type": "string"
                },
                "volumes": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "volumes_from": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "_uniqueItems": true
                },
                "working_dir": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "string_or_list": {
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "$ref": "#/definitions/list_of_strings"
                }
            ]
        }
    },
    "patternProperties": {
        "^[a-zA-Z0-9._-]+$": {
            "$ref": "#/definitions/service"
        }
    },
    "type": "object"
}