1、安装docker环境(参考地址:https://www.runoob.com/docker/centos-docker-install.html)
1.1、Uninstall old versions(卸载老版本)
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engin 1.2、Install using the repository(使用 Docker 仓库进行安装)
sudo yum install -y yum-utils 使用官方源地址(比较慢)
sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo 阿里云
sudo yum-config-manager \ --add-repo \ http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
1.3、Start Docker.
sudo systemctl start docker
1.4、运行hello word
sudo docker run hello-world