Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when running docker-compose I get: client version 1.38 is too new. Maximum supported API version is 1.37"

I am using docker compose as follows:

version: '3.7'
services: 
  couchdb:
    image: "ibmcom/couchdb3:preview"
    container_name: couch-api-test
    ports:
      - "5984:5984"

and here is my docker version:

+ docker version
Client:
 Version:   18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:10:01 2018
 OS/Arch:   linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:  18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:    Wed Mar 21 23:08:31 2018
  OS/Arch:  linux/amd64
  Experimental: false

and my docker-compose version is:

docker-compose version 1.25.0, build 0a186604
docker-py version: 4.1.0
CPython version: 3.7.4

When I run my docker-compose in my ubuntu 16 server I get this:

client version 1.38 is too new. Maximum supported API version is 1.37", "stderr_lines": ["client version 1.38 is too new. Maximum supported API version is 1.37"

Can anyone shed light on it?

like image 882
Learner Avatar asked Sep 13 '25 10:09

Learner


1 Answers

API calls made by the docker-compose client are versioned to ensure that clients don't break. For example to create a container it makes a POST to:

/v1.36/containers/create?name=...

The API version used for the calls is based on the version directive in the docker-compose.yml file. I couldn't find in the documentation the correspondence between the docker-compose file format and the API but I assume for version 3.7 the API version is 1.38.

The 18.03.0-ce docker engine release is compatible with compose file format up to 3.6 and API version 1.37 according to this compatibility matrix: Compose file versions and upgrading

The problem is that the docker-compose client is newer than the engine and it understands the 3.7 format but this format is incompatible with the engine. To make things work use version: '3.6' or update the engine to version 18.06.0+

Hope this helps.

like image 132
b0gusb Avatar answered Sep 15 '25 02:09

b0gusb