MG-RAST/Skyport2

Test for docker-compose version

Closed this issue · 1 comments

The ubuntu repositories at present have a version of docker-compose (0.8?) that does not support the docker-compose format (3.1) we are using.

docker-compose -f Docker/Compose/skyport-demo.yaml up
ERROR: Version in "./Docker/Compose/skyport-demo.yaml" 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/

This says that version 0.13.1 or later will work:
https://docs.docker.com/compose/compose-file/

But if you want docker-compose for ubuntu
https://docs.docker.com/compose/install/

You can install the binary and run with this one-liner:

sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Suggest: Test docker-compose version against 0.13.1 in init.sh and issue a helpful error if it's doomed to fail.

fixed by bc42c07