7

I am trying to test this project https://github.com/saan099/sawtooth-test

But while executing docker-compose up command I found this problem:

ERROR: Version in "./docker-compose.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/

I have tried to change with another version but I still have the same problem. I would be very grateful please if you could help me please.

Those are my docker version and my docker-composer version:

>>> ~/sawtooth-test $ docker --version
Docker version 1.13.1, build 092cba3

>>> ~/sawtooth-test $ docker-compose version
docker-compose version 1.8.0, build unknown
docker-py version: 1.9.0
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016

But when I put this docker-compose --version

   >>> ~/sawtooth-test $ docker version
    Client:
    Version:      1.13.1
    API version:  1.26
    Go version:   go1.6.2
    Git commit:   092cba3
    Built:        Thu Nov  2 20:40:23 2017
    OS/Arch:      linux/amd64

>>> ~/sawtooth-test $ docker-compose --version
docker-compose version 1.8.0, build unknown

Thank you in advance.

2
  • Please, share your docker version, worked for me in Version: 17.12.1-ce API version: 1.35 Go version: go1.10.1 Git commit: 7390fc6 Built: Wed Apr 18 01:23:11 2018 OS/Arch: linux/amd64 Commented May 25, 2018 at 14:40
  • @Kilian could you please the edited question Commented May 25, 2018 at 14:51

2 Answers 2

7

Update the first line of your docker-compose.yml file to say version: '3' instead of version: '2.1'

Here is some more information for you pertaining to Docker-Compose versioning.

https://docs.docker.com/compose/compose-file/compose-versioning/

Sign up to request clarification or add additional context in comments.

Comments

-2

go and nano to docker-compose.yaml

edit version : '2' to "2"

sudo docker-compose up  

finally should fix your issue

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.