1.之前下过docker又想重装就执行以下命令
代码语言:javascript复制$ sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine
2.使用yum命令安装docker
代码语言:javascript复制yum install docker
3.启动docker
代码语言:javascript复制systemctl start docker
4.测试运行 hello-world
代码语言:javascript复制docker run hello-world
5、配置阿里镜像仓库
vim /etc/docker/daemon.json
代码语言:javascript复制vim /etc/docker/daemon.json
代码语言:javascript复制{
"registry-mirrors": ["https://qsicl1hp.mirror.aliyuncs.com"]
}
代码语言:javascript复制systemctl daemon-reload
代码语言:javascript复制systemctl restart docker