compose: docker-compose ps fails for version 2.0 of compose yml
The error message ist: In file './common.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml must map to a dictionary of configuration options.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20
I don’t think this is an issue with
ps
, the config is failing validation.What version of docker-compose are you using? Version 2 is only supported by compose 1.6.
If you’re using 1.6, please provide a sample of
docker-compose.yml
andcommon.yml
.@ismael74 Version 2 of the file format is only supported by Compose 1.6+.
I did have the same problem. Was working on Mac but not on Linux.
docker-compose was simply not at the latest version although the docker package was up to date :
Thanks for the response. My solution was to change this line in my circleci.yml from this:
to this:
Apparently version 1.9 and above have a bug concerning version 2.0 yml files.
docker-compose
is not installed as part of thedocker-engine
package, see https://docs.docker.com/compose/install/