直接安装apt install docker 失败,搞了好久,找到一个解决方案,这里记录下。
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
echo 'deb https://download.docker.com/linux/debian stretch stable'> /etc/apt/sources.list.d/docker.list
如果显示没有权限,就运行下面这条命令
echo "deb https://download.docker.com/linux/debian stretch stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
sudo apt-get update
sudo apt install docker.io
如果报错用下面这条命令
apt-get install docker-ce
docker --version
|