Explorar el Código

Update Compose schema to match docker-compose.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Daniel Nephin hace 8 años
padre
commit
de1ffebf19

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
cli/compose/schema/bindata.go


+ 13 - 10
cli/compose/schema/data/config_schema_v3.0.json

@@ -167,9 +167,10 @@
         "restart": {"type": "string"},
         "restart": {"type": "string"},
         "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
         "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
         "shm_size": {"type": ["number", "string"]},
         "shm_size": {"type": ["number", "string"]},
+        "sysctls": {"$ref": "#/definitions/list_or_dict"},
         "stdin_open": {"type": "boolean"},
         "stdin_open": {"type": "boolean"},
-        "stop_signal": {"type": "string"},
         "stop_grace_period": {"type": "string", "format": "duration"},
         "stop_grace_period": {"type": "string", "format": "duration"},
+        "stop_signal": {"type": "string"},
         "tmpfs": {"$ref": "#/definitions/string_or_list"},
         "tmpfs": {"$ref": "#/definitions/string_or_list"},
         "tty": {"type": "boolean"},
         "tty": {"type": "boolean"},
         "ulimits": {
         "ulimits": {
@@ -192,6 +193,7 @@
           }
           }
         },
         },
         "user": {"type": "string"},
         "user": {"type": "string"},
+        "userns_mode": {"type": "string"},
         "volumes": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
         "volumes": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
         "working_dir": {"type": "string"}
         "working_dir": {"type": "string"}
       },
       },
@@ -200,10 +202,11 @@
 
 
     "healthcheck": {
     "healthcheck": {
       "id": "#/definitions/healthcheck",
       "id": "#/definitions/healthcheck",
-      "type": ["object", "null"],
+      "type": "object",
+      "additionalProperties": false,
       "properties": {
       "properties": {
-        "interval": {"type":"string"},
-        "timeout": {"type":"string"},
+        "disable": {"type": "boolean"},
+        "interval": {"type": "string"},
         "retries": {"type": "number"},
         "retries": {"type": "number"},
         "test": {
         "test": {
           "oneOf": [
           "oneOf": [
@@ -211,9 +214,8 @@
             {"type": "array", "items": {"type": "string"}}
             {"type": "array", "items": {"type": "string"}}
           ]
           ]
         },
         },
-        "disable": {"type": "boolean"}
-      },
-      "additionalProperties": false
+        "timeout": {"type": "string"}
+      }
     },
     },
     "deployment": {
     "deployment": {
       "id": "#/definitions/deployment",
       "id": "#/definitions/deployment",
@@ -326,10 +328,11 @@
           "type": ["boolean", "object"],
           "type": ["boolean", "object"],
           "properties": {
           "properties": {
             "name": {"type": "string"}
             "name": {"type": "string"}
-          }
-        }
+          },
+          "additionalProperties": false
+        },
+        "labels": {"$ref": "#/definitions/list_or_dict"}
       },
       },
-      "labels": {"$ref": "#/definitions/list_or_dict"},
       "additionalProperties": false
       "additionalProperties": false
     },
     },
 
 

+ 2 - 0
cli/compose/types/types.go

@@ -25,7 +25,9 @@ var UnsupportedProperties = []string{
 	"security_opt",
 	"security_opt",
 	"shm_size",
 	"shm_size",
 	"stop_signal",
 	"stop_signal",
+	"sysctls",
 	"tmpfs",
 	"tmpfs",
+	"userns_mode",
 }
 }
 
 
 // DeprecatedProperties that were removed from the v3 format, but their
 // DeprecatedProperties that were removed from the v3 format, but their

+ 1 - 1
hack/validate/compose-bindata

@@ -10,7 +10,7 @@ unset IFS
 if [ ${#files[@]} -gt 0 ]; then
 if [ ${#files[@]} -gt 0 ]; then
 	go generate github.com/docker/docker/cli/compose/schema 2> /dev/null
 	go generate github.com/docker/docker/cli/compose/schema 2> /dev/null
 	# Let see if the working directory is clean
 	# Let see if the working directory is clean
-	diffs="$(git status --porcelain -- api/types/ 2>/dev/null)"
+	diffs="$(git status --porcelain -- cli/compose/schema 2>/dev/null)"
 	if [ "$diffs" ]; then
 	if [ "$diffs" ]; then
 		{
 		{
 			echo 'The result of `go generate github.com/docker/docker/cli/compose/schema` differs'
 			echo 'The result of `go generate github.com/docker/docker/cli/compose/schema` differs'

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio