一、安装
1、查看内核uname -r
2、更新包sudo apt-get update
3、没有docker旧版本,忽略这一步。如果有则需要卸载旧的版本,主要为了防止新旧版本冲突
sudo apt-get remove docker docker-engine docker.io
4、为了防止 apt 源使用 HTTPS 以确保软件下载过程中不被篡改。我们需要添加使用 HTTPS 传输的软件包及 CA 证书
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
5、确认下载软件包的合法性,需要添加软件源的 GPG 密钥,但因网络问题设置docker源改为国内源(阿里)
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
6、向 source.list 中添加 Docker CE 软件源
sudo add-apt-repository "deb [arch=armhf] https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian $(lsb_release -cs) stable"
7、安装sudo apt-get install docker-ce
补充:官方一键安装有两种方式,第一种方式使用外网圆,所以比较慢,建议使用第二种方式安装
1、curl -fsSL https://g