找回密码
 立即注册
查看: 55|回复: 0

安装Docker,配置Docker的yum库失败解决方法

[复制链接]

156

主题

5

精华

160

金币

技术维护QQ:515138

积分
345
发表于 2026-1-5 09:50:48 | 显示全部楼层 |阅读模式
游客,如果您要查看本帖隐藏内容请回复

f2b78698c7614c4a8666795a86d9e697.png
2.png
3.png
  1. # CentOS-Base.repo
  2. #
  3. # The mirror system uses the connecting IP address of the client and the
  4. # update status of each mirror to pick mirrors that are updated to and
  5. # geographically close to the client.  You should use this for CentOS updates
  6. # unless you are manually picking other mirrors.
  7. #
  8. # If the mirrorlist= does not work for you, as a fall back you can try the
  9. # remarked out baseurl= line instead.
  10. #
  11. #
  12. [base]
  13. name=CentOS-$releasever - Base
  14. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
  15. baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
  16. gpgcheck=1
  17. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  18. #released updates
  19. [updates]
  20. name=CentOS-$releasever - Updates
  21. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
  22. baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
  23. gpgcheck=1
  24. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  25. #additional packages that may be useful
  26. [extras]
  27. name=CentOS-$releasever - Extras
  28. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
  29. baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
  30. gpgcheck=1
  31. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  32. #additional packages that extend functionality of existing packages
  33. [centosplus]
  34. name=CentOS-$releasever - Plus
  35. #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
  36. baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
复制代码
再执行就可以了。
  1. # 启动Docker
  2. systemctl start docker
  3. # 停止Docker
  4. systemctl stop docker
  5. # 重启
  6. systemctl restart docker
  7. # 设置开机自启
  8. systemctl enable docker
  9. # 执行docker ps命令,如果不报错,说明安装启动成功
  10. docker ps
复制代码

11.jpg

配置镜像加速

https://cr.console.aliyun.com/cn-shenzhen/instances/mirrors


上一篇:SSH客户端
下一篇:Docker部署mysql
网站建设,公众号小程序开发,系统定制,软件App开发,技术维护【联系我们】手机/微信:17817817816 QQ:515138

QQ|Archiver|自丢网 ( 粤ICP备2024252464号-1 )

GMT+8, 2026-1-19 11:34

专注于网站建设,公众号小程序制作,商城小程序,系统定制,软件App开发

【联系我们】手机/微信:17817817816 QQ:515138

快速回复 返回顶部 返回列表