docker-compose version ERROR
esmaeelE opened this issue · 2 comments
esmaeelE commented
On Debian 11 here is the message after run docker-compose -d
$ 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 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/
But as it said changing
version: '3.8' -> '3.3'
will solve it.
MaxianEdison commented
esmaeelE commented
Thanks in advance @MaxianEdison, I know it can be done but as updating a single package in stable Debian especially from non-official repository not recommend and not a choice for me.
One option is to check distribution release and then change $ version variable but it can be complicated for other type of OSes.
Maybe adding a comment to README.md file expressing something like this is better.
If you are running Debian stable please set version number to '3.3' in docker-compose.yml file.
version: '3.3'