github.com/docker/libcompose@v0.4.1-0.20210616120443-2a046c0bdbf2/hack/config_schema_v1.json (about)

     1  {
     2    "$schema": "http://json-schema.org/draft-04/schema#",
     3    "id": "config_schema_v1.json",
     4  
     5    "type": "object",
     6  
     7    "patternProperties": {
     8      "^[a-zA-Z0-9._-]+$": {
     9        "$ref": "#/definitions/service"
    10      }
    11    },
    12  
    13    "additionalProperties": false,
    14  
    15    "definitions": {
    16      "service": {
    17        "id": "#/definitions/service",
    18        "type": "object",
    19  
    20        "properties": {
    21          "build": {"type": "string"},
    22          "cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
    23          "cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
    24          "cgroup_parent": {"type": "string"},
    25          "command": {
    26            "oneOf": [
    27              {"type": "string"},
    28              {"type": "array", "items": {"type": "string"}}
    29            ]
    30          },
    31          "container_name": {"type": "string"},
    32          "cpu_shares": {"type": ["number", "string"]},
    33          "cpu_quota": {"type": ["number", "string"]},
    34          "cpuset": {"type": "string"},
    35          "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
    36          "dns": {"$ref": "#/definitions/string_or_list"},
    37          "dns_search": {"$ref": "#/definitions/string_or_list"},
    38          "dockerfile": {"type": "string"},
    39          "domainname": {"type": "string"},
    40          "entrypoint": {
    41            "oneOf": [
    42              {"type": "string"},
    43              {"type": "array", "items": {"type": "string"}}
    44            ]
    45          },
    46          "env_file": {"$ref": "#/definitions/string_or_list"},
    47          "environment": {"$ref": "#/definitions/list_or_dict"},
    48  
    49          "expose": {
    50            "type": "array",
    51            "items": {
    52              "type": ["string", "number"],
    53              "format": "expose"
    54            },
    55            "uniqueItems": true
    56          },
    57  
    58          "extends": {
    59            "oneOf": [
    60              {
    61                "type": "string"
    62              },
    63              {
    64                "type": "object",
    65  
    66                "properties": {
    67                  "service": {"type": "string"},
    68                  "file": {"type": "string"}
    69                },
    70                "required": ["service"],
    71                "additionalProperties": false
    72              }
    73            ]
    74          },
    75  
    76          "extra_hosts": {"$ref": "#/definitions/list_or_dict"},
    77          "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
    78          "hostname": {"type": "string"},
    79          "image": {"type": "string"},
    80          "ipc": {"type": "string"},
    81          "labels": {"$ref": "#/definitions/list_or_dict"},
    82          "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
    83          "log_driver": {"type": "string"},
    84          "log_opt": {"type": "object"},
    85          "mac_address": {"type": "string"},
    86          "mem_limit": {"type": ["number", "string"]},
    87          "memswap_limit": {"type": ["number", "string"]},
    88          "mem_swappiness": {"type": "integer"},
    89          "net": {"type": "string"},
    90          "pid": {"type": ["string", "null"]},
    91  
    92          "ports": {
    93            "type": "array",
    94            "items": {
    95              "type": ["string", "number"],
    96              "format": "ports"
    97            },
    98            "uniqueItems": true
    99          },
   100  
   101          "privileged": {"type": "boolean"},
   102          "read_only": {"type": "boolean"},
   103          "restart": {"type": "string"},
   104          "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
   105          "shm_size": {"type": ["number", "string"]},
   106          "stdin_open": {"type": "boolean"},
   107          "stop_signal": {"type": "string"},
   108          "tty": {"type": "boolean"},
   109          "ulimits": {
   110            "type": "object",
   111            "patternProperties": {
   112              "^[a-z]+$": {
   113                "oneOf": [
   114                  {"type": "integer"},
   115                  {
   116                    "type":"object",
   117                    "properties": {
   118                      "hard": {"type": "integer"},
   119                      "soft": {"type": "integer"}
   120                    },
   121                    "required": ["soft", "hard"],
   122                    "additionalProperties": false
   123                  }
   124                ]
   125              }
   126            }
   127          },
   128          "user": {"type": "string"},
   129          "volumes": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
   130          "volume_driver": {"type": "string"},
   131          "volumes_from": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
   132          "working_dir": {"type": "string"}
   133        },
   134  
   135        "dependencies": {
   136          "memswap_limit": ["mem_limit"]
   137        },
   138        "additionalProperties": false
   139      },
   140  
   141      "string_or_list": {
   142        "oneOf": [
   143          {"type": "string"},
   144          {"$ref": "#/definitions/list_of_strings"}
   145        ]
   146      },
   147  
   148      "list_of_strings": {
   149        "type": "array",
   150        "items": {"type": "string"},
   151        "uniqueItems": true
   152      },
   153  
   154      "list_or_dict": {
   155        "oneOf": [
   156          {
   157            "type": "object",
   158            "patternProperties": {
   159              ".+": {
   160                "type": ["string", "number", "null"]
   161              }
   162            },
   163            "additionalProperties": false
   164          },
   165          {"type": "array", "items": {"type": "string"}, "uniqueItems": true}
   166        ]
   167      },
   168  
   169      "constraints": {
   170        "service": {
   171          "id": "#/definitions/constraints/service",
   172          "anyOf": [
   173            {
   174              "required": ["build"],
   175              "not": {"required": ["image"]}
   176            },
   177            {
   178              "required": ["image"],
   179              "not": {"anyOf": [
   180                {"required": ["build"]},
   181                {"required": ["dockerfile"]}
   182              ]}
   183            }
   184          ]
   185        }
   186      }
   187    }
   188  }