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
终端的显示结果如下:

Step 2: 安装指定版本的Docker-CE:
$2 sudo apt-get -y install docker-ce=[VERSION] # 上图的第二列为版本VERSION,例如VERSION=17.03.0~ce-0~ubuntu-xenial
如果错误,请积极指正!感谢!
网友评论