0

My issue is that a docker-compose project (builds three docker images) works on a server A (ubuntu 18.04) but not on server B (ubuntu 14.04). The error I get on server B is the following:

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 81, in main
  File "compose/cli/main.py", line 200, in perform_command
  File "compose/cli/command.py", line 70, in project_from_options
  File "compose/cli/command.py", line 153, in get_project
  File "compose/cli/docker_client.py", line 43, in get_client
  File "compose/cli/docker_client.py", line 170, in docker_client
  File "docker/api/client.py", line 209, in __init__
docker.errors.InvalidVersion: API versions below 1.21 are no longer supported by this library.

On Server A, I see the following versions regarding docker and docker-compose:

Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:32 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:09 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

On server B the same are:

Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.2.1
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64
Server version: 1.6.2
Server API version: 1.18
Go version (server): go1.2.1
Git commit (server): 7c8fca2
OS/Arch (server): linux/amd64

docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019
  • Using docker build directly on the Dockerfiles seems to be working ok on server B. The problem seems to be related with docker-compose.
  • Yet, I don't understand if this is a problem with docker or docker-compose. Also, I don't understand which of the above versions is refered to by "API versions below 1.21" mentioned in the error.
  • Some ideas I had was adding a docker-compose version on the top of the docker-compose.yaml file or upgrade/downgrade some version (if possible in 14.04). I am not sure if this is the right direction. Can you suggest a solution?
1
  • 2
    On the second server (B) you are running both an outdated version of ubuntu and docker. Yet you installed a rather recent docker-compose version which does not support your dino-aged docker version. If you really need to make this work, you can try to downgrade docker-compose (and it's dependencies - you might have to go far back). Meanwhile, unless you are on the ESM ubuntu program, the real safe solution would be to stop using server B completely (or upgrade it to a still supported OS) Sep 9 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.