1.首先安装docker 因docker依赖操作系统相关软件
yum -y install gcc
yum -y install gcc-c++
1.1 卸载之前的docker版本
yum remove docker \
docker-client \\
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \\
docker-engine
1.2安装docker并启动
yum install docker
systemctl start docker
systemctl enable docker 开机自启
1.3查看版本
docker version
1.4测试运行hello-world
docker run hello-world