Description
Problem
Sometimes (or frequently) users have trouble talking to the docker engine with their docker client because they accidentally update their docker client and the server now has an older version.
It's too hard to get this right and that this usually happens by one off (e.g. client:1.18 server:1.17) and there is not major differences between these versions. This especially happens to the people who are compiling docker from master
and talking to a Linux daemon in boot2docker or some cloud VM.
This happens to me a few times a day as I'm finding myself upgrading to latest docker client version and all my servers are old or CoreOS is totally lagging two versions behind or something.
Proposal
I propose a power user environment variable DOCKER_APIVERSION
used in the client to override the constant in api/common.go when set:
$ ./docker info
FATA[0000] Error: client and server don't have same version (client : 1.18, server: 1.17)
$ DOCKER_APIVERSION=1.17 ./docker info
Containers: 0
Images: 0
[...]
This can easily help people to try out latest client binaries downloaded from master.dockerproject.com which has the latest bug fixes against their existing docker host deployed somewhere on the cloud.
Considerations
Since this enables the way of undefined behavior and feature set mismatch between the client and the engine this must be thoroughly documented that it is dangerous area. (and probably should exist only in development environment documentation instead of user guide).
Users will be seeing feature mismatches most of the time in the cutting-edge new features added to cli but missing from the docker host.