Docker详细安装教程
1, 卸载旧的版本

2,需要的安装
yum install -y yum-utils
3, 设置阿里云镜像仓库
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
更新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
浙公网安备 33010602011771号