DockerCLI/cli
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
..
command cli/command: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:14 +01:00
compose cli/compose/schema: make version: "3" equivalent to "3.x" (latest) 2022-03-01 09:40:33 +01:00
config cli/config: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:15 +01:00
connhelper Use designated test domains (RFC2606) in tests 2021-04-30 10:03:45 +02:00
context cli/context: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:16 +01:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
manifest cli/manifest: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:17 +01:00
registry/client vendor: github.com/docker/docker 25917217cab38eab40c3db0010b915258f4a8491 2021-06-22 10:16:54 +02:00
streams update docker, replace github.com/docker/pkg/term, github.com/docker/pkg/mount 2020-04-22 17:16:13 +02:00
trust cli/trust: remove deprecated io/ioutil and use t.TempDir() 2022-02-25 15:42:18 +01:00
version Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
winresources Use goversioninfo to create Windows Version Info 2021-10-11 16:54:22 +02:00
cobra.go cli.SetupRootCommand(): minor cleanup 2021-08-16 12:32:16 +02:00
cobra_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-23 00:28:55 +01:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go Disable unparam linter: cli/required.go:102:16: `pluralize` - `word` always receives `"argument"` (unparam) 2019-10-31 19:22:22 +01:00
required_test.go cli: remove deprecated io/ioutil 2022-02-25 15:42:19 +01:00