1.卸载旧版本
2.配置Docker的yum库
首先要安装一个yum工具
如果报错
Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"
One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:
先运行下面这段指令
然后再输入
再重新执行
安装成功后,执行命令,配置Docker的yum源
3.安装Docker
最后执行命令,安装Docker
4启动和校验
5.配置镜像加速
根据阿里云的说明去配置