ubuntu20.04上docker部署

1.docker安装方法:

docker安装方法

2.拉取失败

sudo docker pull hello-world

2.1解决方法

方案1:配置国内镜像加速器(成功率最高,强烈推荐)

bash 复制代码
sudo tee /etc/docker/daemon.json <<-'eof'
{
"registry-mirrors": [
    "https://docker.m.daocloud.io",
    "https://docker.mirrors.sjtug.sjtu.edu.cn",
    "https://docker.nju.edu.cn",
    "https://docker.m.daocloud.io",
    "https://dockerproxy.com",
    "https://docker.m.daocloud.io"
  ]
}
eof

重启docker

bash 复制代码
sudo systemctl daemon-reload
sudo systemctl restart docker

再次拉取

bash 复制代码
sudo docker pull hello-world

方案2:2025~2026年仍然比较稳定的几个代理镜像站(直接拉取)

bash 复制代码
# 方式1:最常用(推荐)
sudo docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/hello-world:latest

# 方式2:华为云
sudo docker pull swr.cn-south-1.myhuaweicloud.com/ddn-k8s/hello-world:latest

# 方式3:中科大(更新比较勤快)
sudo docker pull docker.mirrors.ustc.edu.cn/library/hello-world:latest

成功拉下来之后可以重新 tag 成官方名字:

bash 复制代码
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/hello-world:latest hello-world:latest
相关推荐
jerryinwuhan1 小时前
《系统部署与运维》开篇 课程介绍
运维
张忠琳2 小时前
【k3s】AutoK3s v0.9.3 Part 1 入口与 CLI 命令模块 — 超深度逐行分析之三
云原生·容器·kubernetes·k3s·autok3s
我是谁??4 小时前
Ubuntu22.04更换清华源
linux·运维·服务器
Shell运维手记4 小时前
Linux 常用基础命令学习笔记
linux·运维·笔记·学习·算法·github
朴马丁4 小时前
国际与国产PLM在精细化工赛道的布局:2026年主要厂商技术特色
大数据·运维·人工智能·流程行业plm·化工新材料
Elastic 中国社区官方博客6 小时前
Elasticsearch:使用 AI Agent 来创建 workflow
大数据·运维·人工智能·elasticsearch·搜索引擎·自动化·全文检索
测试运维日常笔记6 小时前
Linux系统安装配置TigerVNC服务器完整指南
linux·运维·服务器
喜欢的名字被抢了7 小时前
程序出问题怎么查,以及如何让它不掉线
java·运维·数据库
雾时之林7 小时前
Linux----cron定时服务
linux·运维·服务器
壹玖玖肆7 小时前
医院后勤智能运维系统实用性评测
运维