51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

rpm包安装 docker

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

赞(8)
未经允许不得转载:工具盒子 » rpm包安装 docker