1.安装docker (1)删除旧版本(如果有的话):yum -y remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine (2)安装所需要的依赖包:yum -y install yum-utiils device-mapper-persistant-data lvm2 (3)设置yum仓库:yum-config-manager –add-repo https://download.