1。查看内核版本:
#uname -r
3.19.0-15-generic
2。更新apt源:
/etc/apt/sources.list.d/docker.list下加入:
debhttps://apt.dockerproject.org/repo ubuntu-vivid main
#apt-get update
这个需要多试几个url, 个人也是试用了好多个,下载包才安装正常。3.添加GPG密钥
#apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
4。获取docker有效版本:
# apt-cache policy docker-engine
docker-engine:
Installed: 1.7.1-0~utopic
Candidate: 1.9.1-0~vivid
Version table:
1.9.1-0~vivid 0
500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
1.9.0-0~vivid 0
500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
1.8.3-0~vivid 0
500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
1.8.2-0~vivid 0
。。。。
5。安装docker:
# apt-get install docker-engine=1.9.1-0~vivid--fix-missing
最好加上--fix-missing,也可能安装失败,根据前面的信息,多试几个版本。
6。测试:
#docker info
Containers: 0
Images: 0
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.19.0-15-generic
Operating System: Ubuntu 15.04
CPUs: 4
Total Memory: 2.931 GiB
Name: cdh1