比这网上搜的 一行代码安装docker,不知道怎么回事自己的不行。
curl -sSL https://get.docker.com | sh
还是官网的靠谱。
如果安装过老版本先卸载
sudo apt-get remove docker docker-engine docker.io containerd runc
更新软件源,安装一些依赖
apt-get update
sudo apt-get install
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common
添加官方密钥
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
验证下指纹
sudo apt-key fingerprint 0EBFCD88
安装docker引擎
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
跑一个helloworld
sudo docker run hello-world