Johan
Johan

Reputation: 40510

Installing a specific version of docker-engine (v1.7+) on Ubuntu?

Docker have changed the way docker-engine is installed on Ubuntu since version 1.7 (if I'm not mistaken). Before you could do for example:

sudo apt-get install lxc-docker-1.3.3

to install version 1.3.3 as described in this answer. But nowadays the installation instructions tells us to do:

curl -sSL https://get.docker.com/ | sh

But this always installs (or upgrades to) the lastest version of Docker. This is not always what you want to do, for example when managing a cluster of servers which needs to run a specific Docker version. So my question is, how do I install a specific version with all required dependencies?

Upvotes: 2

Views: 2249

Answers (2)

Larry Cai
Larry Cai

Reputation: 59963

Short answer is to add extra command after your curl command

# apt-get install docker-engine=1.7.1-0~trusty

More detail explaination:

docker-engine is used instead of lxc-docker since 1.7.x as you noticed.

The command you used curl -sSL https://get.docker.com/ | sh is a shortcut to install latest version, and it works for all the platform

If you use ubuntu, you can check detail steps inside https://get.docker.com, it is like below:

# apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main " >   /etc/apt/sources.list.d/docker.list
# apt-get update 
# apt-get install docker-engine

If you want to specific version, replace last step to

# apt-get install docker-engine=1.7.1-0~trusty

Upvotes: 5

nitishagar
nitishagar

Reputation: 9413

You can install docker from binaries by getting it from following urls:

https://get.docker.com/builds/Linux/i386/docker-<version> 
https://get.docker.com/builds/Linux/x86_64/docker-<version>

Here is ref for installing from binaries.

Upvotes: 0

Related Questions