如果docker已将安装好
参考:https://github.com/cmliu/CF-Workers-docker.io
sudo mkdir -p /etc/dockercd /etc/dockersudo vim daemon.json#输入以下内容{ "registry-mirrors": ["https://docker.fxxk.dedyn.io"] } #重启docker服务sudo systemctl daemon-reloadsudo systemctl restart docker#试验是否可以正常拉取镜像,若可以拉取则设置成功
如果docker还没安装
uname -ryum install -y yum-utils device-mapper-persistent-data lvm2yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoyum install docker-ce docker-ce-cli containerd.io -y systemctl start dockersystemctl enable dockerdocker version docker images
其中镜像可以尝试换换
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repohttps://docker.fxxk.dedyn.io