1、CentOS版本为7.x 。

2、使yum的CentOS-Extras配置生效

文件CentOS-Base.repo中enabled的値从0变成1
vim /etc/yum.repos.d/CentOS-Base.repo    
[extras]    
name=CentOS-$releasever - Extras    
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras    
gpgcheck=1    
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7    
enabled=1    ★    値从0变成1
※Docker is included by default in the CentOS-Extras repository 


3、执行yum 安装

VM CentOS Docker 安装

VM CentOS Docker 安装

4、启动 Docker 后台服务

VM CentOS Docker 安装

5、运行hello-world

VM CentOS Docker 安装



相关文章:

  • 2021-06-18
  • 2021-08-10
  • 2021-09-28
  • 2021-04-24
  • 2022-03-09
  • 2021-09-22
  • 2022-12-23
  • 2021-10-05
猜你喜欢
  • 2021-11-29
  • 2021-04-25
  • 2021-09-04
  • 2021-10-28
  • 2021-07-27
  • 2021-11-23
相关资源
相似解决方案