Recently Docker released an update that was a breaking change for my team over at Habitica. This gave me a new perspective that keep your nodes on the same version and only upgrading when needed is something to consider while managing a large swam. This, of course, should have be obvious since we do the same with many NPM packages.. 😛
There is documentation on how to use specific engine when provision, but you do need to use an external url. I’ll quickly show you how to provision your Docker node with an older version.
Checking the Docs
If we take a look at the docs: https://docs.docker.com/machine/reference/create/, we see an option for specifying and engine install url
--engine-install-url. So, you could host your own install url, or you can use one from here: https://github.com/rancher/install-docker.
And the Final Result
docker-machine create \ --driver virtualbox \ --engine-install-url "https://releases.rancher.com/install-docker/17.05.sh" node-1
A Real Life Example
The dev example is nice, but I always like to see what people to in real life. Here is the exact command I used.
docker-machine create \ --engine-install-url "https://releases.rancher.com/install-docker/17.05.sh" \ --driver azure \ --azure-subscription-id $AZURE_SUB_ID \ --azure-size Standard_A4 \ worker-12
Docker definitely thought of the need for locking in versions, but thanks to Rancher, the process is simple. Also, thanks to this comment for showing me Rancher: https://github.com/docker/machine/issues/1702#issuecomment-314411175