Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

client is newer than server (client API version: 1.24, server API version: 1.21)

When I do :

sudo docker version

I obtain this error:

Error response from daemon:client is newer than server (client API version: 1.24, server API version: 1.21)

Anyone can help me to understand what I have to do?

like image 440
Picco Avatar asked Mar 28 '17 14:03

Picco


Video Answer


2 Answers

Try setting the version using the command:

export DOCKER_API_VERSION=1.23

It worked perfectly fine for me and resolved the issue.

like image 128
Vijay Rai Avatar answered Sep 30 '22 06:09

Vijay Rai


Docker is running on client / server model, each Docker Engine release has a specific API version.

The combination of the release version and API version of Docker is as follows:

https://docs.docker.com/engine/api/v1.26/#section/Versioning

According to the table above, the Docker API v1.24 is used in Docker Engine 1.12.x and the Docker API v1.21 is used in the Docker Engine 1.9.x. The server needs API version equal to or later than the client.

You have the following three options.

  1. Upgrade the server side to Docker Engine 1.12.x or later.
  2. Downgrade the client side to Engine 1.9.x or lower.
  3. Downgrade the API version used at run time by exporting the DOCKER_API_VERSION=1.21 to environment variable on the client side.
like image 20
minamijoyo Avatar answered Sep 30 '22 06:09

minamijoyo