-
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
Docker compose config omitting the compose file version element #9133
Comments
I'm a bit confused, what's your goal? If you need the compose file contents you can use |
Docker Compose adopted the Compose Specification, which makes the |
This is likely a duplicate of #8950, and it relates back to this issue. |
Thanks @ndeloof and @robertbartel. Robert, you got it exactly right. We use So basically, there's been a divergence in the code bases here. We're using Docker Compose file format version 3.x (3.4 specifically, but we could probably upgrade that not), which is supported by Docker Engines 17.09.0+ (according to this compatibility matrix). @ndeloof I don't get what you are referring to about this "Compose Specification"? Please can you link to more information. In the mean time, I'll downgrade back to Docker Compose v1.26.2, which is the last release for the "Compose Specification" was adopted in v1.27.0 (source). |
@smidge84 https://compose-spec.io/
|
Thanks @ndeloof. We like to interpolate all our compose files into a single "flat/interpolated" file for the following reasons:
Does that help you understand the context a bit more? I hope I've managed to explain this is a clear way. Also, thanks for the immediate reply btw. |
Why have you Closed this issue? We haven't finished discussing yet. |
closed as a duplicate for docker/cli#2527 |
Thanks @ndeloof, I understand now, and thanks for the link to the open issue on the Docker Cli project. For now, I'll downgrade to Docker Compose v1.26.2 until the open issue is resolved. |
@thaJeztah Has just commented in issue #2475 that the following Pull Request might resolve the problem we're seeing: |
Description
When using Docker compose config to interpolate service definitions into a single flat stack file, the output omits the "version" field which specifies the compose file version. The is required for deployment, either via Docker compose of Docker swarm, resulting in the following error message:
"unsupported Compose file version: 1.0"
This is because, without the "version" field in the compose file, Docker default back to compose file version 1.0
Steps to reproduce the issue:
Describe the results you received:
Outcome received:
Describe the results you expected:
Expected outcome:
Additional information you deem important (e.g. issue happens only occasionally):
This issue happens consistently every time.
Output of
docker compose version
:Output of
docker info
:Additional environment details:
macOS Monterey 12.2
The text was updated successfully, but these errors were encountered: