how to fix error ERROR: Version in "./docker-compose.yml" is unsupported
root@zconf:~/greenlight# docker-compose up -d
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
root@zconf:~/greenlight#
Hey @bijism,
This is a duplicate of #228, where I gave a suggestion to how to fix this problem. Please give it a try and let me know if it helps.
What version of docker compose are you running?
docker-compose -v
You should be running the latest version of docker-compose. I suggest uninstalling then reinstalling.
I got an update on Ubuntu
The Docker version is 3.7
Take a look the the docker-compose version compatibility matrix. You should upgrade to a version that supports 3.0 or greater.
To do that use sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Most helpful comment
To do that use
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose