https://www.xtplayer.cn/2017/02/2783

 

ubuntu 安装指定版本的docker

2017-02-17 分类:docker 阅读(158) 评论(0) 

实验环境:

1、宿主机系统:Ubuntu16.04

2docker源:阿里云

1、添加docker

cat >/etc/apt/sources.list.d/docker-main.list<<EOF

deb [arch=amd64] http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial main

EOF

2Add Docker’s official GPG key:

curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -

3、更新源和升级系统

apt-get update && apt-get upgrade -

4、卸载旧版本docker

apt-get purge lxc-docker*

5、列出docker版本

apt-cache policy docker-engine

root@node:~# apt-cache policy docker-engine
docker-engine:
Installed: (none)
Candidate: 1.13.1-0~ubuntu-xenial
Version table:
1.13.1-0~ubuntu-xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.13.0-0~ubuntu-xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
100 /var/lib/dpkg/status
1.12.6-0~ubuntu-xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.5-0~ubuntu-xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.4-0~ubuntu-xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.3-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.2-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.1-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.12.0-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.11.2-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.11.1-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
1.11.0-0~xenial 500
500 http://mirrors.aliyun.com/docker-engine/apt/repo ubuntu-xenial/main amd64 Packages
root@node:~#

6、安装指定版本

apt-get install -y docker-engine=xxxxx

 

 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐