Thursday, 23 March 2017

docker.errors.APIError: 400 Client Error client is newer than server

You can face this issue when you are trying to use docker python library.

Error:
docker.errors.APIError: 400 Client Error: Bad Request for url: http+docker://localunixsocket/v1.26/images/json?only_ids=0&all=0 ("client is newer than server (client API version: 1.26, server API version: 1.24)")

Solution:

client= docker.from_env(version='auto')

Use parameter "version" when instantiating a client.

1 comment: