Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"docker-compose.yml" version rejected, but why?

My YML file begins like this:

 version: "3.7"
 services:
 ... ... etc ... ...

But I get this error:

 ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this [...]

However, the Docker is "Ubuntu's latest version!"

$ docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.1
 Git commit:        2d0083d
 Built:             Fri Aug 16 14:20:06 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.1
  Git commit:       2d0083d
  Built:            Wed Aug 14 19:41:23 2019
  OS/Arch:          linux/amd64
  Experimental:     false

$ docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.17
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018

The documentation https://docs.docker.com/compose/compose-file/ says that version 3.7 will work with "18.06.0+" so I really don't understand why I'm getting this message at all. The documentation would suggest that this version of Docker does support (and expect) this version.

like image 235
Mike Robinson Avatar asked Apr 09 '26 16:04

Mike Robinson


1 Answers

It looks like your version of docker-compose is incompatible. The version you are using (1.17.1) only supports a compose file format up to version 3.4. You can view the compatibility matrix in the release notes:

1.17.1 release

You can update docker-compose with the following:

curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

And find more information about docker-compose installation here

like image 155
sloppypasta Avatar answered Apr 21 '26 12:04

sloppypasta