Improve backward-compatibility support for older API versions by marcust · Pull Request #335 · docker-java/docker-java

Hey @marcuslinke, I get your reasoning. But I think from time to time it might be necessary to be "somewhat" backward compatible, meaning that for a period of time it might be useful to support an older version as well as the current version. I don't aim at supporting every version of the API ever, but #288 is a case where it is really easy to allow backward compatibility.

From my use-case point of view I have 20+ devs and a CI setup which is not realistically just updated to a newer docker version. Furthermore some distros come with older versions (Jessie comes with 1.6.2) and I think we should ease the pain of the clients and users.

In my opinion moby/moby#14092 was an unintended regression that got fixed in the clients after it was clear that the daemon is not going to support both variants.

I wrote this patch because of alexec/docker-java-orchestration#49 which currently fails because Circle CI comes with docker 1.6.2 and thus started failing tests when migrated to docker-java 2.x