Install particular version of docker

I want to install a particular version (1.9) of docker on my ubuntu os. However, when I try to follow the installation doc here https://docs.docker.com/v1.9/engine/installation/ubuntulinux/, it always installs the latest version which is 1.11.1 now.

Is there a way to install a particular version ? Any document on this ?

Appreciate help, thanks.

I get this error when trying with 1.9.0 (after reading some forums)

sudo apt-get install docker-engine=1.9.0~wily
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '1.9.0~wily' for 'docker-engine' was not found

Hi,

Did you create the file /etc/apt/sources.list.d/docker.list with the the following entry?

deb https://apt.dockerproject.org/repo ubuntu-wily main

After doing this, don’t forget to sudo apt-get update.

Then to list all possible versions of a particular packages, use apt-cache policy

root@25c6b167bd36:/# apt-cache policy docker
docker:
  Installed: (none)
  Candidate: 1.5-1
  Version table:
     1.5-1 0
        500 http://mirror.optus.net/ubuntu/ wily/universe amd64 Packages
root@25c6b167bd36:/# apt-cache policy docker-engine
docker-engine:
  Installed: (none)
  Candidate: 1.11.1-0~wily
  Version table:
     1.11.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.11.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.10.3-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.10.2-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.10.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.10.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.9.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.9.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.3-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.2-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.7.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.6.2-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.6.1-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.6.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.5.0-0~wily 0
        500 http://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages

From the above list, install the required version. If you are not getting the above list, that means skipped either of the first steps.

Regards

OK got it, thanks.

Is there any official doc on how to install a particular version rather than searching the web ? Docker must document this.