diff --git a/schema/compose-spec.json b/schema/compose-spec.json index 4c2af240..bd7ac17f 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -815,6 +815,10 @@ "type": "string", "description": "The consistency requirements for the mount. Available values are platform specific." }, + "mount": { + "type": "boolean", + "description": "Use the mount API (bind is preferred by default)" + }, "bind": { "type": "object", "description": "Configuration specific to bind mounts.", diff --git a/types/derived.gen.go b/types/derived.gen.go index 93adf490..c76ebf45 100644 --- a/types/derived.gen.go +++ b/types/derived.gen.go @@ -2025,6 +2025,12 @@ func deriveDeepCopy_47(dst, src *UlimitsConfig) { // deriveDeepCopy_48 recursively copies the contents of src into dst. func deriveDeepCopy_48(dst, src *ServiceVolumeConfig) { dst.Type = src.Type + if src.Mount == nil { + dst.Mount = nil + } else { + dst.Mount = new(bool) + *dst.Mount = *src.Mount + } dst.Source = src.Source dst.Target = src.Target dst.ReadOnly = src.ReadOnly diff --git a/types/types.go b/types/types.go index e93d493e..6ba3d6b2 100644 --- a/types/types.go +++ b/types/types.go @@ -537,6 +537,7 @@ func convertPortToPortConfig(port nat.Port, portBindings map[nat.Port][]nat.Port // ServiceVolumeConfig are references to a volume used by a service type ServiceVolumeConfig struct { Type string `yaml:"type,omitempty" json:"type,omitempty"` + Mount *bool `yaml:"mount,omitempty" json:"mount,omitempty"` Source string `yaml:"source,omitempty" json:"source,omitempty"` Target string `yaml:"target,omitempty" json:"target,omitempty"` ReadOnly bool `yaml:"read_only,omitempty" json:"read_only,omitempty"`