rpm包安装 docker
1.下载相应的软件包
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
2.基于现成的rpm包进行安装
[root@centos202 ~]# tar xf -docker-24_0_2.tar.gz && yum -y localinstall -docker-24_0_2/*.rpm
3.启动docker服务
[root@centos202 ~]# systemctl enable --now docker
4.开启自动补全功能
[root@centos202 ~]# source /usr/share/bash-completion/bash_completion
5.配置镜像加速
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://tuv7rqqq.mirror.aliyuncs.com"]
}
EOF
systemctl daemon-reload
systemctl restart docker
6.查看镜像加速是否配置成功
docker info | grep "Registry Mirrors" -A 1
参考链接:
https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors