打开 /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