1
This commit is contained in:
parent
4b3cb9cc13
commit
13b7c6f993
@ -217,6 +217,39 @@ docker run -d -e NODE_ENV=development -e DEBUG=proxy:* proxy-ip-manager
|
||||
docker pull node:24.11.0-alpine
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
## 🇨🇳 国内用户加速(可选)
|
||||
|
||||
### Docker Hub镜像加速
|
||||
如果Docker Hub拉取镜像较慢,可以配置国内镜像加速:
|
||||
|
||||
```bash
|
||||
# 配置Docker镜像加速器(以阿里云为例)
|
||||
sudo mkdir -p /etc/docker
|
||||
sudo tee /etc/docker/daemon.json <<-'EOF'
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://docker.mirrors.ustc.edu.cn",
|
||||
"https://hub-mirror.c.163.com",
|
||||
"https://mirror.baidubce.com"
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
# 重启Docker服务
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
### 构建时使用国内Node.js镜像
|
||||
```bash
|
||||
# 直接使用国内镜像源构建
|
||||
docker build -t proxy-ip-manager .
|
||||
|
||||
# 或者指定国内镜像构建
|
||||
docker build --build-arg REGISTRY=https://registry.npmmirror.com -t proxy-ip-manager .
|
||||
```
|
||||
|
||||
4. **备份数据**:
|
||||
```bash
|
||||
# 备份数据库
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user