使用国内镜像加速

main
mula.liu 2025-12-23 17:23:41 +08:00
parent 6c828b44d3
commit ac7ae71526
2 changed files with 13 additions and 1 deletions

View File

@ -221,10 +221,14 @@ docker logs nex-docus-mysql
### 5. 镜像下载缓慢
已配置国内镜像加速:
- Docker 基础镜像使用华为云镜像
- Debian APT 包使用阿里云镜像源
- Python 使用清华源
- Node 使用淘宝镜像
如需更换 Docker 镜像源,编辑 `/etc/docker/daemon.json`
**Docker 镜像源配置**(如需更换):
编辑 `/etc/docker/daemon.json`
```json
{
"registry-mirrors": [
@ -234,6 +238,10 @@ docker logs nex-docus-mysql
}
```
**说明**
- `backend/Dockerfile` 已配置阿里云 Debian APT 源,系统依赖安装速度大幅提升
- 如构建仍然缓慢,可尝试清华源:`mirrors.tuna.tsinghua.edu.cn`
## 🔐 安全建议
1. **修改默认密码**

View File

@ -10,6 +10,10 @@ ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# 替换为阿里云 Debian 镜像源(国内加速)
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources
# 安装系统依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \