打開 /etc/apt/sources.list.d/docker.list 中添加下面內容
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
更新並安裝
sudo apt-get update
如果 sudo apt-get update 的過程很慢,可以嘗試使用國內的鏡像
sudo apt-get install docker-ce
打開 /etc/apt/sources.list.d/docker.list 中添加下面內容
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
更新並安裝
sudo apt-get update
如果 sudo apt-get update 的過程很慢,可以嘗試使用國內的鏡像
sudo apt-get install docker-ce