## 先卸载已有的docker
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
## 使用docker提供便捷脚本安装
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
见官网:https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository