danionescu0 / docker-flask-mongodb-example

Uses docker compose with a python flask microservice and MongoDB instance to make a sample application
GNU General Public License v3.0
99 stars 41 forks source link

ERROR: Version in "./docker-compose.yml" is unsupported. #100

Closed kamal2222ahmed closed 3 years ago

kamal2222ahmed commented 3 years ago

when trying to run the command $docker-compose build , i get error:

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 supported version (e.g "2.2" or "3.3") 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/

$ cat docker-compose.yml version: '3.8'

installed version:

$ docker --version Docker version 19.03.5, build 633a0ea

danionescu0 commented 3 years ago

Hello

I think the error might be present due to an old version of docker compose. Please check that you have docker compose (1.28.4) or above installed.

You can issue the following command in the console to check this: docker-compose --version

If you have an older version, please install a new one, check out their official tutorial: https://docs.docker.com/compose/install/ And please check the "Upgrading" chapter

Tell me how it worked out, thanks!

danionescu0 commented 3 years ago

I'll close the issue in 24 hours if's is all ok for you.