docker ce是社区版docker ee是企业版删除系统旧版本的docker(官网说要这样的)sudo yum remove -y docker \docker-client docker-client-latest docker-common \docker-latest docker-latest-logrotate docker-logrotate \docker-selinux docker-engine-selinux docker-engine安装所需软件包(官网说要这样的)sudo yum install -y yum-utils device-mapper-persistent-data lvm2添加稳定版本的仓库(官网说要这样的)cd /etc/yum.repos.d/sudo wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo禁用测试版和每月尝鲜版sudo yum-config-manager --disable docker-ce-testsudo yum-config-manager --disable docker-ce-edgesudo yum makecache列出可以安装的版本sudo yum list docker-ce --showduplicates | sort -r安装社区版(完成了),用rpm包和用脚本都一样,用yum更好sudo yum install docker-ce -y修改用户命令许可,a(追加用户),G(组名)sudo groupadd dockersudo usermod -aG docker 用户名更换一下镜像源sudo mkdir /etc/dockersudo vi /etc/docker/daemon.json--------------------------------{ "registry-mirrors": ["http://hub-mirror.c.163.com"], "dns":["223.5.5.5", "223.6.6.6"]}--------------------------------或者配置docker加速curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d6c9c79f.m.daocloud.io运行sudo systemctl start docker.servicesudo systemctl stop docker.servicesudo systemctl restart docker.servicesudo systemctl enable docker.service
强迫症患者移步官网通道