Update DOCKER_README.md to address log file permission issues, providing troubleshooting steps for Linux/Mac and Windows users. Clarify the importance of ensuring the logs directory has the correct permissions for the container's node user.

This commit is contained in:
theluyuan 2025-10-31 09:36:08 +08:00
parent c9ccb3435d
commit 8cb074660a

View File

@ -159,7 +159,27 @@ mkdir -p data logs
sudo chown -R 1000:1000 data logs
```
### 3. 性能优化
### 3. 日志文件权限问题
如果遇到 `EACCES: permission denied` 错误:
```bash
# Linux/Mac
mkdir -p logs
chmod 777 logs # 或者 chmod 755 logs
# Windows PowerShell (如果使用Docker Desktop)
New-Item -ItemType Directory -Path logs -Force
# 在Docker Desktop设置中确保目录有正确权限
# 或者删除logs目录让容器自动创建
rm -rf logs
# 然后重新启动容器
docker-compose up -d
```
**注意**:容器内使用 `node` 用户UID 1000运行确保挂载的logs目录对该用户有写入权限。
### 4. 性能优化
```bash
# 限制内存使用
docker run -d --memory=512m proxy-ip-manager