更新 apt-get
sudo apt-get update

安装软件包
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

添加Docker的官方GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
添加 Docker 仓库
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
再次更新 apt-get
sudo apt-get update
安装 docker 社区版本
sudo apt-get install docker-ce
启动 docker
sudo systemctl status docker