參考
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