文章目录
官方文档:https://docs.docker.com/engine/install/centos/
1、安装docker
下载依赖包
bash
yum -y install gcc
yum -y install gcc-c++
yum install -y yum-utils
设置仓库
bash
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新yum软件包索引
bash
yum makecache fast
安装DOCKER CE
bash
yum -y install docker-ce docker-ce-cli containerd.io

2、启动docker
bash
systemctl start docker
3、验证
查看docker
bash
docker version

运行helloworld
bash
docker run hello-world
