From 1bdab6be8ee5769eb8124229fa1a56ef283da10c Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Wed, 12 Apr 2017 15:26:07 +0200 Subject: [PATCH] fix yaml validation for image mounts Signed-off-by: Thomas Gazagnaire --- src/cmd/moby/schema.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/cmd/moby/schema.go b/src/cmd/moby/schema.go index 31913893b..1123fd4c8 100644 --- a/src/cmd/moby/schema.go +++ b/src/cmd/moby/schema.go @@ -56,6 +56,20 @@ var schema = string(` "type": "array", "items": {"type": "string"} }, + "mount": { + "type": "object", + "additionalProperties": false, + "properties": { + "destination": { "type": "string" }, + "type": { "type": "string" }, + "source": { "type": "string" }, + "options": { "$ref": "#/definitions/strings" } + } + }, + "mounts": { + "type": "array", + "items": { "$ref": "#/definitions/mount" } + }, "image": { "type": "object", "additionalProperties": false, @@ -64,7 +78,7 @@ var schema = string(` "name": {"type": "string"}, "image": {"type": "string"}, "capabilities": { "$ref": "#/definitions/strings" }, - "mounts": { "$ref": "#/definitions/strings" }, + "mounts": { "$ref": "#/definitions/mounts" }, "binds": { "$ref": "#/definitions/strings" }, "tmpfs": { "$ref": "#/definitions/strings" }, "command": { "$ref": "#/definitions/strings" },