Problem:
Error:
Docker error: Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39
Resolution:
There is some discussion externally on this topic here: https://github.com/kubernetes-sigs/kubespray/issues/6160#issuecomment-630606081
The workaround for this issue appears to be adding an environment variable DOCKER_API_VERSION=1.39, which I think via Bitbucket Pipeline you can accomplish with: docker run -e