Update docker-compose to run as root and modify permission setting in ChineseNfoRegistry to remove sudo
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 11s
Docker Build & Deploy / Deploy to Production (push) Successful in 16s

This commit is contained in:
孙诚
2025-03-19 15:05:27 +08:00
parent 795937d052
commit fbea48813e
2 changed files with 3 additions and 1 deletions

View File

@@ -5,6 +5,8 @@
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: nas_robot container_name: nas_robot
restart: always restart: always
privileged: true
user: root
networks: networks:
- all_in - all_in
environment: environment:

View File

@@ -65,7 +65,7 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
var skippedCount = 0; var skippedCount = 0;
// 使用 root 角色执行 chmod -R 666 设置全部文件的读写权限 // 使用 root 角色执行 chmod -R 666 设置全部文件的读写权限
var permission = new ProcessStartInfo("sudo", "chmod -R 666 " + tvFolder) var permission = new ProcessStartInfo("chmod", "-R 666 " + tvFolder)
{ {
CreateNoWindow = true, CreateNoWindow = true,
UseShellExecute = false UseShellExecute = false