参考
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#set-up-the-repository
步骤
1. 安装https支持、add-apt命令支持等前置
sudo apt update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
2. 添加GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
3. 添加dockerCE仓库源
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
4. 安装docker
sudo apt-get update
sudo apt-get install docker-ce