Docker-compose: client version is too new

Hi there,
when executing DOCKER_API_VERSION=1.35 docker-compose --verbose up I’m getting:

-d compose.config.config.find: Using configuration files: ./docker-compose.yml docker.utils.config.find_config_file: Trying
paths: [’/home/vivo/.docker/config.json’, ‘/home/vivo/.dockercfg’]
docker.utils.config.find_config_file: No config file found
docker.utils.config.find_config_file: Trying paths:
[’/home/vivo/.docker/config.json’, ‘/home/vivo/.dockercfg’]
docker.utils.config.find_config_file: No config file found
urllib3.connectionpool._make_request: http://localhost:None “GET
/v2.25/version HTTP/1.1” 400 84 Traceback (most recent call last):
File “site-packages/docker/api/client.py”, line 261, in
_raise_for_status File “site-packages/requests/models.py”, line 940, in raise_for_status requests.exceptions.HTTPError: 400 Client Error:
Bad Request for url: http+docker://localhost/v2.25/version

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “bin/docker-compose”, line
6, in File “compose/cli/main.py”, line 71, in main File
j

“compose/cli/main.py”, line 124, in perform_command File
“compose/cli/command.py”, line 42, in project_from_options File
“compose/cli/command.py”, line 123, in get_project File
“compose/cli/command.py”, line 97, in get_client File
“site-packages/docker/api/daemon.py”, line 181, in version File
“site-packages/docker/api/client.py”, line 267, in _result File
“site-packages/docker/api/client.py”, line 263, in _raise_for_status
File “site-packages/docker/errors.py”, line 31, in
create_api_error_from_http_exception docker.errors.APIError: 400
Client Error: Bad Request (“client version 2.25 is too new. Maximum
supported API version is 1.38”)

My docker version:

docker-tutorial % docker version Client: Version:
18.06.3-ce API version: 1.27 Go version: go1.10.3 Git commit: d7080c1 Built: Wed Feb 20 02:27:13 2019
OS/Arch: linux/amd64 Experimental: false

Server: Engine: Version: 18.06.3-ce API version:
1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: d7080c1 Built: Wed Feb 20 02:25:38 2019 OS/Arch:
linux/amd64 Experimental: false

My docker-compose version:

docker-tutorial % docker-compose version docker-compose version
1.24.1, build 4667896b docker-py version: 3.7.3 CPython version: 3.6.8 OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018

And my docker-compose.yml:

version: '2.1'

services:
    app:
        image: php:7.2-apache
        volumes:
            - .:/var/www/html
        ports:
            - 8000:80