- 查看自己的Linux系统
bash
cat /etc/redhat-release
- 安装依赖插件
bash
yum -y install gcc
yum -y install gcc-c++
yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce docker-ce-cli containerd.io
- 配置阿里云的镜像加速器,原地址的镜像一般很难拉取下来,按操作步骤,复制粘贴即可

- 最后运行hello word,说明docker安装成功
bash
docker run hello-world
