1.4 KiB
1.4 KiB
title, type, permalink, stable_id, scope, project_id, memory_type, status, revision, restored_from_commit, created_at, updated_at, tags
| title | type | permalink | stable_id | scope | project_id | memory_type | status | revision | restored_from_commit | created_at | updated_at | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Docker Hub 连接失败排障 | experience | main/projects/6f47523e-e22e-4cdd-bd18-76e5e474ee0c/docker-hub-连接失败排障 | 61e30ee3-0e26-4d64-b00e-f77bc3a3fd60 | project | 6f47523e-e22e-4cdd-bd18-76e5e474ee0c | experience | active | 1 | 6a6a895eaf |
2026-09-23T14:58:36.607100+00:00 | 2026-09-23T14:58:36.607150+00:00 |
|
问题
docker build 拉取 ubuntu:24.04 时报错:failed to fetch oauth token,dial tcp auth.docker.io:443 超时或连接重置。
原因
- Docker Desktop 代理模式为 System,手动配置的代理地址不生效。
- OPENWRT_BUILD_PROXY 只传给 docker run,不影响 docker build 拉取基础镜像。
- registry-mirrors 配置的第三方加速地址不可用时也会导致失败。
解决方案
- Docker Desktop → Settings → Resources → Proxies → 选择 Manual proxy configuration
- HTTP 和 HTTPS Proxy 都填 http://127.0.0.1:7897
- Apply & Restart
- 先验证 docker pull ubuntu:24.04 成功
- 然后重新构建
注意事项
- settings-store.json 中 ProxyHTTPMode 必须为 manual 才能使用 OverrideProxyHTTP
- 如果保持 System 模式,必须在代理软件中开启“设置为系统代理”
- 容器内下载需另外设置 OPENWRT_BUILD_PROXY(回环地址会被转换为 host.docker.internal)