-
repo 准备
``` yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ```
-
配置只下载稳定版
yum-config-manager --enable docker-ce-edge yum-config-manager --enable docker-ce-test yum makecache fast
-
安装docker
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo yum install docker-ce y
-
更换配置源
默认的源下载慢,换成国内的源vim /etc/docker/daemon.json ''' { "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] } '''
-
开启docker
systemctl restart docker docker info
网友评论