diff --git a/schema/compose-spec.json b/schema/compose-spec.json index 86e3de1e..a4d5cfce 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -408,7 +408,8 @@ "bind": { "type": "object", "properties": { - "propagation": {"type": "string"} + "propagation": {"type": "string"}, + "create_host_path": {"type": "boolean"} }, "additionalProperties": false, "patternProperties": {"^x-": {}} diff --git a/spec.md b/spec.md index 8e42bc21..10e5a3ea 100644 --- a/spec.md +++ b/spec.md @@ -1811,6 +1811,9 @@ expressed in the short form. - `read_only`: flag to set the volume as read-only - `bind`: configure additional bind options - `propagation`: the propagation mode used for the bind + - `create_host_path`: create a directory at the source path on host if there is nothing present. + Do nothing if there is something present at the path. This is automatically implied by short syntax + for backward compatibility with docker-compose legacy. - `volume`: configure additional volume options - `nocopy`: flag to disable copying of data from a container when a volume is created - `tmpfs`: configure additional tmpfs options