ubuntu20.04 安装docker

更换源

如果上述方法都无法解决问题,您可以尝试更换 Docker 的镜像源。在中国大陆地区,您可以使用阿里云的 Docker 镜像服务。首先,添加阿里云 Docker 镜像服务的 GPG 密钥:

bash 复制代码
sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

然后,配置阿里云的 Docker 镜像源:

bash 复制代码
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

最后,继续安装 Docker:

bash 复制代码
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
相关推荐
退役小学生呀9 天前
三、kubectl使用详解
云原生·容器·kubernetes·k8s
API开发9 天前
苹果芯片macOS安装版Homebrew(亲测) ,一键安装node、python、vscode等,比绿色软件还干净、无污染
vscode·python·docker·nodejs·openssl·brew·homebrew
程序员小潘9 天前
Kubernetes多容器Pod实战
云原生·容器·kubernetes
进击的码码码码N9 天前
Docker 镜像加速
运维·docker·容器
Q_w77429 天前
基于 Docker 的服务部署探索(Day 2)
运维·docker·容器
white.tie9 天前
docker方式启动Jenkins
docker·容器·jenkins
IT成长日记10 天前
【Docker基础】Docker容器管理:docker pause详解
运维·docker·容器·docker pause
Koma_zhe10 天前
【ToolJet远程开发】Ubuntu+Docker结合内网穿透技术搭建ToolJet远程开发环境
linux·ubuntu·docker
没有口袋啦10 天前
Docker 服务无法启动问题
运维·docker·容器
微信公众号:AI创造财富10 天前
Docker 安装 ModelScope(推荐流程)
spring cloud·docker·eureka