Ubuntu安装指定版本的docker

系统环境:

Ubuntu 16.0.4

安装版本:

docker  17.03.2

 

1.更新apt源

apt-get update

 

2.安装可以使用https使用存储库的包

apt-get install -y apt-transport-https ca-certificates curl software-properties-common

 

3.添加官网docker的GPG密钥

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 

4.设置stable存储库

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

 

5.更新apt源again

apt-get update

 

6.网络不好会出现以下报错,多执行几次就成功了

 

7.查看docker-ce的版本

apt-cache madison docker-ce

 

8.安装docker

apt-get install docker-ce=17.03.2~ce-0~ubuntu-xenial

 

9.网络不好会出现以下报错,多执行几次就成功了

 

10.安装成功

 

posted @ 2018-09-21 15:46  _chy  阅读(1822)  评论(0编辑  收藏  举报