client version 1.43 is too new. Maximum supported API version is 1.41

Problem

Trying to use the Docker API to create/stop/delete a container gives the error

client version 1.43 is too new. Maximum supported API version is 1.41


Solution

Use the following

export DOCKER_API_VERSION=1.41

as described here