Ubuntu安装指定版本的docker

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 @ 2022-08-07 11:51  anakinf  阅读(1201)  评论(0编辑  收藏  举报