安装命令: # 卸载旧版docker yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine # 安装依赖包 yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 # 设置仓库 (清华大学源) yum-config-manager \ --add-repo \ https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo # 安装新的Docker实例 yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin # 设置开机启动 systemctl enable docker # 启动docker systemctl start docker # 重启docker systemctl restart docker 卸载命令: # apt卸载 yum remove docker-ce # 移除docker文件目录 rm -rf /var/lib/docker
标签:CentOS,ce,systemctl,yum,Docker,安装,docker,latest From: https://www.cnblogs.com/huangkai00000/p/17581665.html