1CentOS 版本为 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 安装
4 启动 Docker 后台服务
5 运行 hello-world
来源: http://www.bubuko.com/infodetail-2507274.html