DockerCLI/cli/compose/loader
Sebastiaan van Stijn 60c3836365
cli/compose/schema: make version: "3" equivalent to "3.x" (latest)
Previously, `version: "3"` was equivalent to `version: "3.0"`, which
caused confusion for many users, as they expected it to be "3.x".

docker-compose and docker compose (v2) have adopted the compose-spec
(https://compose-spec.io), which no longer has a version field in
the compose file, and always picks the "latest" supported version.

This changes how `docker stack` interprets "major" version numbers
specified in compose-files:

When only the major version ("3") is specified, it is now equivalent
to "3.x" (latest supported v3 schema).

Compose-files that specify both major and minor version (e.g. "3.0"
or "3.1") continue to use the existing behavior; validation is down-
graded to the specified version and will produce an error if options
are used that are not supported in that schema version. This allows
users to locally verify that a composse-file does not use options
that are not supported in the intended deployment environment (for
example if the deploy environment only supports older versions of
the schema).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-01 09:40:33 +01:00
..
example1.env Import docker/docker/cli 2017-04-17 17:40:59 -04:00
example2.env Import docker/docker/cli 2017-04-17 17:40:59 -04:00
full-example.yml Add support for pids limit in stacks (swarm) 2020-06-18 21:25:08 +02:00
full-struct_test.go Add support for pids limit in stacks (swarm) 2020-06-18 21:25:08 +02:00
interpolate.go Add interpolation type cast for max_replicas_per_node 2019-11-05 08:31:36 +01:00
loader.go Replace mattn/go-shellwords with google/shlex 2020-07-20 10:20:42 +02:00
loader_test.go cli/compose/schema: make version: "3" equivalent to "3.x" (latest) 2022-03-01 09:40:33 +01:00
merge.go Added transforms for compose overrides 2020-01-24 15:52:36 +00:00
merge_test.go Merge pull request #2357 from thaJeztah/gofmt_test 2020-02-26 15:23:57 +01:00
types_test.go Add support for pids limit in stacks (swarm) 2020-06-18 21:25:08 +02:00
volume.go fix panic on single-character volumes 2020-02-21 01:38:52 +01:00
volume_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
windows_path.go Detect Windows absolute paths on non-Windows CLI 2019-07-10 21:25:03 +02:00
windows_path_test.go compose/loader: fix TestIsAbs not testing all combinations 2019-10-29 15:02:23 +01:00