CentOS 安装 Docker
更新系统软件包
sudo yum update -y
安装软件包
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
添加Docker的yum仓库
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装Docker CE
sudo yum install -y docker-ce docker-ce-cli containerd
启动Docker
sudo systemctl start docker
设置自启
sudo systemctl enable docker