如何在 CentOS 7 上安装 Docker

2022-07-28 教育 67阅读
1、使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

2、执行yum 安装

# yum install docker

3、Docker启动

# systemctl start docker
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com