- Centos安装Docker
- 1、确认版本是Centos7及以上
- 2、安装gcc相关
- 3、安装软件包
- 4、设置镜像仓库
- 5、更新软件包索引
- 6、安装Docker
- 7、启动Docker
- 8、测试Docker
- 查看Docker版本
- 运行hello-world
- 9、配置阿里云加速
cat /etc/redhat-release2、安装gcc相关
yum -y install gcc yum -y install gcc-c++3、安装软件包
yum install -y yum-utils4、设置镜像仓库
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo5、更新软件包索引
yum makecache fast6、安装Docker
yum -y install docker-ce docker-ce-cli containerd.io7、启动Docker
systemctl start docker8、测试Docker 查看Docker版本
docker version运行hello-world
docker run hello-world9、配置阿里云加速
将代码复制执行即可。



