# 1 切换镜像源
[root@master ~]# wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
# 2 设置国内镜像并重启 daemon
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"exec-opts": ["native.cgroupdriver=systemd"],
"registry-mirrors": ["https://j16wttpi.mirror.aliyuncs.com"]
}
EOF
# 3 进行安装命令,并设置docker自动重启
yum install -y docker-ce
systemctl start docker
systemctl enable docker
# 4 查看并验证
docker info
# 5 解压并执行以下命令
tar -xf cri-dockerd-0.2.6.amd64.tgz
cp cri-dockerd/cri-dockerd /usr/bin/
chmod +x /usr/bin/cri-dockerd
标签:mirrors,repos,ce,repo,etc,dockerd,docker,cri,安装
From: https://www.cnblogs.com/khtt/p/17203398.html