官方文档:https://docs.docker.com/engine/install/centos/
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
# centos7
sudo yum install docker-ce docker-ce-cli containerd.io -y
# centos 8
sudo yum install --nobest docker-ce docker-ce-cli containerd.io -y