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:
parent
c9ccb3435d
commit
8cb074660a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user