docker安装参考地址
https://docs.docker.com/engine/install/centos/
卸载旧版本
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
配置仓库
yum install -y yum-utils yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装docker
yum install docker-ce docker-ce-cli containerd.io
启动docker
systemctl start docker
查看是否启动成功
docker -v
设置开机自启动检查当前已安装的镜像
docker images
设置开机自启动
systemctl enable docker