Docker: "Error response from daemon: client version 1.40 is too new. Maximum supported API version i
Problem
An error response related to the maximum supported API version is received from the Docker daemon upon running any CLI commands, e.g.
# docker version
Client: Docker Engine - Community
Version: 19.03.9
API version: 1.40
Go version: go1.13.10
Git commit: 9d988398e7
Built: Fri May 15 00:25:34 2020
OS/Arch: linux/amd64
Experimental: false
Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39The docker-ce package has an internal dependency on docker-ce-cli but the dependent package version is not locked. The latest version of the CLI gets installed implicitly as part of this dependency. However, on May 15th, 2020, a new version of the CLI was released that broke compatibility with the docker-ce 18.09.9 version.
**Note:**This issue is likely to have impacted any nodes added between May 15th, 2020 and May 28th, 2020. Verify your Docker CLI version is impacted before proceeding with resolution steps. These steps may not be effective in resolving issues encountered with other versions of the client.
$ docker version
Client: Docker Engine - Community Version: 19.03.9 ...Environment
Platform9 Managed Kubernetes - All Versions
Docker Client v19.03.9
Cause
docker-ce-cli(client) v19.03.9 fails to downgrade its API version to match the server, as recognized in docker/cli#2533. This has now been rectified with the latest release pushed out May 29th, 2020, Docker Client v19.03.10.
Resolution
As mentioned above, Docker has pushed a release with a fix. Please use the steps below to ensure you have the latest release.
Ubuntu
Run the following command to update the package metadata.
Setup the Docker repository.
Setup apt utilities.
Download Docker GPG key.
Add Docker repository to your host.
Install the latest version of docker-ce-cli.
CentOS
Setup the Docker repository.
Add yum-utils.
Note: CentOS may ask you to accept the GPG key for this repository when you install something from the repository in the next step.
Install the latest version of docker-ce-cli.
Last updated
