-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 docker-compose config does not expose "Version", this breaks swarm deploys #8950
Comments
Docker Compose embrace the Compose Specification and doesn't set obsolete |
Having read this thread and others, it seems that the general mood about solving this problem within the docker stack cli is a bit grim. So, I wrote a compose-spec compliant docker-cli plugin replacement of |
Can someone please explain why this issue is closed when the config command still doesn't work as it was supposed to? the compose version of 1.29 still does a better job at templating than the V2 version. |
Depends what you consider "supposed to". Compose v2 conforms to the compose specification, docker stack doesn't |
When using compose version 1.29 for the |
It might be easier to understand if you'd consider the new file format as a "V4" with the version implied by the absence of the |
This fiels is obsolete, it never guaranteed any kind of runtime compatibility, and was deprecated by the compose specification introduced in 2020 |
Ok thanks for the clarifications and your time. I've tested the functionality and there were no problems. |
Description
Docker-compose V2 does not expose the docker-compose.yml "Version" field when running
docker-compose --file docker-compose.yml config
. The older V1 version does expose this. This leads to failing docker swarm deployments as docker swarm then only reports the following:We go the extra route through docker-compose because a docker stack deploy is not able to read .env files.
Steps to reproduce the issue:
docker-compose --file docker-compose.yml config
Describe the results you received:
No version field (output from docker-compose V2.1.1):
Describe the results you expected:
A version field (output from docker-compose V1.29.2):
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker compose version
:Output of
docker info
:Additional environment details:
The text was updated successfully, but these errors were encountered: