There’s a lot online info on how to install your docker engine, and they are fairly simple to follow, but they all use the latest docker version. The problem I have with this approach is that sometimes, you may want to install a specific version (older version) that is compatible with other plugins that you have in your setup. Most third party vendors that have integration with docker engine will certify their product on older version of docker, and it will take them some time until they certify the latest version. Installing an older docker engine version is not hard, but it also is not clearly spelled out anywhere, and this post aims to help address that shortcoming.
In this post, I am going to show you how to install a specific version of the Docker Engine package on Ubuntu. I am going to install 1.11 instead of 1.12 (latest version at the time of writing this blog).
First let me start with how you install the latest version of Docker Engine. You type
apt-get install docker-engine
If you do an apt-cache search docker-engine, though, you’ll find that the “docker-engine” package is a metapackage that refers to a variety of different versions of the Docker Engine. To install a specific version of the Docker Engine, you simply append the version (as described by the results of the apt-cache search docker-engine command) to the end, like this:
apt-get install docker-engine=1.11.2-0~trusty
This will install version 1.11.2 of the Docker Engine.
If you are an ansible fan, and you want to install docker engine through ansible, simply use the same syntax in your ansible task file. For example, this snippet of an Ansible playbook would install version 1.11.2 of the Docker Engine:
– name: Install Docker packages
As I said before, it’s fairly simple to add a version to your linux package. Hopefully this post will make it easier for others who find themselves in a similar situation.