美文网首页
Ubuntu16.04+Docker安装+阿里云

Ubuntu16.04+Docker安装+阿里云

作者: 残剑天下论 | 来源:发表于2019-11-17 13:56 被阅读0次

Docker官网安装Docker的方式在我的电脑上不起作用,有多个报错,另外国内使用Docker官网的镜像,下载速度也会很慢。因此我果断使用阿里云Docker,以下是在Ubuntu16.04上安装docker的过程:

Step 1: 安装必要的一些系统工具

$1 sudo apt-get update
$2 sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

Step 2: 安装GPG证书

$3 curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

Step 3: 写入软件源信息

$4 sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

Step 4: 更新并安装Docker-CE

$5 sudo apt-get -y update
$6 sudo apt-get -y install docker-ce

安装指定版本的Docker-CE:

Step 1: 查找Docker-CE的版本:

$1 apt-cache madison docker-ce
终端的显示结果如下: image.png

Step 2: 安装指定版本的Docker-CE:

$2 sudo apt-get -y install docker-ce=[VERSION]  # 上图的第二列为版本VERSION,例如VERSION=17.03.0~ce-0~ubuntu-xenial

如果错误,请积极指正!感谢!

相关文章

网友评论

      本文标题:Ubuntu16.04+Docker安装+阿里云

      本文链接:https://www.haomeiwen.com/subject/dsavictx.html