1.访问https://docs.docker.com/
2.进入download

3输入cento
或者直接访问地址Install Docker Engine on CentOS | Docker Docs

4一步一步根据官网命令走
2安装

常见报错:
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 在另外一台Linux服务器中出现如下错误:
1 2 3 4 | grabbing file https: //download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo https: //download.docker.com/linux/centos/docker-ce.repo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable" Trying other mirror. Could not fetch/save url https: //download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable" |
将yum源设置为阿里云 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo |
|
3

4
