1. 安装docker
#1. yun包更新 yum update #2. 安装所需要的软件包,yum-util提供yun-config-manager功能,另外两个是devicemapper驱动依 赖的 yum install -y yum-util device-mapper-persistent-data lvm2 #3. 设置yum源 yum-config-manager --add-repo http://download.docker.com/linux/centos/dockerce. repo #wget -o http://download.docker.com/linux/centos/docker-ce.repo也可以,就是下载源配 置,然后更新源 #4.安装docker,出现输入的界面都按y yum install -y docker-ce #5. 查看docker版本,验证安装是否成功 docker -v
2. 配置阿里云镜像加速器
1. 登录阿里云,选择右上角的控制台
2. 搜索容器镜像服务
3. 点击镜像加速器,会有一个加速器地址,并配有修改教程。
(这个加速器是免费的,每个人私有的)