Version in “./docker-compose.yml” is unsupported. You might be seeing this error because you’re using the wrong Compose file version

You are doing everything right and it should work. But there was a bug in docker-compose 1.11.0 which not recognized file format 3.1 as valid. (3.0 works).

There is already a new release of docker-compose (1.11.1) which includes the bugfix:

Bugfixes

Fixed a bug where the 3.1 file format was not being recognized as valid by the Compose parser

So I would recommend to upgrade your docker-compose version if you want to use file format 3.1.

At the moment the safest way to upgrade docker-compose is by deleting it and reinstalling it.

rm /usr/local/bin/docker-compose

Reinstall:

curl -L https://github.com/docker/compose/releases/download/1.11.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
docker-compose version 1.11.1, build 7c5d5e4

Now there isn’t an error anymore on the file format. (I did not test with your .yml).

docker-compose up
Starting compose_a_1
Starting compose_b_1

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)