- Complete knowledge base list and detail pages - Complete document upload component - Fix CORS config (add PUT/DELETE method support) - Fix file upload issues (disabled state and beforeUpload return value) - Add detailed debug logs (cleaned up) - Create Day 21-22 completion summary document
113 lines
2.2 KiB
Markdown
113 lines
2.2 KiB
Markdown
# Docker 镜像加速器配置指南
|
||
|
||
## 📋 操作步骤
|
||
|
||
### 1. 打开Docker Desktop设置
|
||
|
||
1. 在系统托盘找到 **Docker Desktop** 图标(鲸鱼图标)
|
||
2. **右键点击** → 选择 **Settings** (设置)
|
||
|
||
### 2. 进入Docker Engine配置
|
||
|
||
1. 在左侧菜单中点击 **Docker Engine**
|
||
2. 您会看到一个JSON配置编辑器
|
||
|
||
### 3. 添加镜像加速器配置
|
||
|
||
在JSON配置中添加 `registry-mirrors` 配置项:
|
||
|
||
**如果配置为空**,替换为:
|
||
```json
|
||
{
|
||
"builder": {
|
||
"gc": {
|
||
"defaultKeepStorage": "20GB",
|
||
"enabled": true
|
||
}
|
||
},
|
||
"experimental": false,
|
||
"registry-mirrors": [
|
||
"https://docker.mirrors.ustc.edu.cn",
|
||
"https://hub-mirror.c.163.com",
|
||
"https://registry.docker-cn.com"
|
||
]
|
||
}
|
||
```
|
||
|
||
**如果已有配置**,在现有配置中添加 `registry-mirrors` 部分:
|
||
```json
|
||
{
|
||
"现有配置项...": "...",
|
||
"registry-mirrors": [
|
||
"https://docker.mirrors.ustc.edu.cn",
|
||
"https://hub-mirror.c.163.com",
|
||
"https://registry.docker-cn.com"
|
||
]
|
||
}
|
||
```
|
||
|
||
### 4. 应用并重启
|
||
|
||
1. 点击右下角的 **Apply & restart** 按钮
|
||
2. 等待Docker Desktop重启(约30秒-1分钟)
|
||
3. 确认Docker Desktop状态变为 "Running"(绿色)
|
||
|
||
### 5. 验证配置
|
||
|
||
打开PowerShell,运行:
|
||
```powershell
|
||
docker info | Select-String -Pattern "Registry Mirrors"
|
||
```
|
||
|
||
应该看到类似输出:
|
||
```
|
||
Registry Mirrors:
|
||
https://docker.mirrors.ustc.edu.cn/
|
||
https://hub-mirror.c.163.com/
|
||
https://registry.docker-cn.com/
|
||
```
|
||
|
||
---
|
||
|
||
## ✅ 完成配置后
|
||
|
||
配置完成后,请回到终端,我们将继续部署Dify。
|
||
|
||
---
|
||
|
||
## 🔧 备选镜像源
|
||
|
||
如果上述镜像源仍然有问题,可以尝试其他国内镜像源:
|
||
|
||
```json
|
||
{
|
||
"registry-mirrors": [
|
||
"https://dockerproxy.com",
|
||
"https://mirror.baidubce.com",
|
||
"https://docker.m.daocloud.io"
|
||
]
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## 📞 故障排查
|
||
|
||
### 问题1:Docker Desktop无法重启
|
||
- 完全关闭Docker Desktop
|
||
- 在任务管理器中结束所有Docker相关进程
|
||
- 重新启动Docker Desktop
|
||
|
||
### 问题2:配置后仍无法拉取镜像
|
||
- 检查网络连接
|
||
- 尝试使用备选镜像源
|
||
- 考虑使用VPN(如有)
|
||
|
||
---
|
||
|
||
**完成配置后,请在终端告诉我,我们将继续下一步!**
|
||
|
||
|
||
|
||
|