cli/compose: add schema 3.10, with optional version field (default to "latest") by thaJeztah · Pull Request #3257 · docker/cli (original) (raw)
The compose spec (https://compose-spec.io) defines the version to be optional,
and implementations of the spec to check for supported attributes instead.
While this change does not switch the docker stack
implementation to use the
compose-spec, it makes it function more similar. Previously, omitting a version
number would either produce an error (as the field was required), or switched
the handling to assume it was version 1.0 (which is deprecated).
With this change, compose files without a version number will be handled as
the latest version supported by docker stack
(currently 3.10). This allows
users that work with docker-compose or docker compose (v2) to deploy their
compose file, without having to re-add a version number. Fields that are
not supported by docker stack
(schema 3.10) will still produce an error.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)