系统配置
Ubuntu20.04
安装docker
第一步:卸载旧版docker
sudo apt-get remove docker docker-engine docker.io containerd runc
第二步:更新软件源列表
sudo apt-get update
第三步:安装使用 HTTPS 传输的协议包和 CA 证书
注:curl是字符界面的浏览器
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
第四步:添加Docker GPG秘钥
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
第五步:向软件源列表中添加docker软件源
# 软件版本有三种:stable、edge、test,我们选择stable稳定版 # 添加官方源 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # 添加