安装yum-utils
sudo yum install -y yum-utils
设置阿里源
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装Docker
sudo yum install docker-ce docker-ce-cli containerd.io -y
#启动
sudo systemctl start docker
#停止
sudo systemctl stop docker
#重启
sudo service docker restart
#开机启动
sudo systemctl enable docker
#查看帮助
docker --help