使用docker官方脚本

curl -fsSL https://get.docker.com -o install.sh && chmod u+x install.sh && ./install.sh