1, 卸载旧的版本
2,需要的安装
yum install -y yum-utils
3, 设置镜像的仓库
https://blog.csdn.net/qq_43168442/article/details/116770163 (访问这个博客网站进行配置)
更新yum软件包索引
yum makecache fast
4,安装docker docker-ce 社区 ee企业版
yum remove docker-ce docker-ce-cli containerd.io
5,启动docker
systemctl start docker
6, 查看版本
docker version
7,hello-world
docker run hello-world (如果执行完这条命令显示报错,需要先行配置阿里云镜像加速)
8,查看一下下载的这个hello-world 镜像
阿里云镜像加速
操作系统选择相对应的配置
3,配置使用
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://ge25sy00.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker