分享docker compose 运行Emby(解决无法选择目录)

2

所有都带注释,自行查看即可。其他docker compose项目也可以参考
最重要的是environment设置的权限组

  • UID=0 # 设置容器内部的用户 ID 为 root 用户

  • GID=0 # 设置容器内部的组 ID 为 root 组

  • GIDLIST=0 # 可选:设置其他需要的组 ID 列表(此处为 root 组)

  • PUID=0 # 设置容器内的用户 ID 为 root 用户

  • PGID=0 # 设置容器内的组 ID 为 root 组

version: '3.8'

services:
emby:
image: amilys/embyserver
container_name: embyserver
privileged: true # 允许容器使用主机的硬件资源(包括核显)
environment:

  • UID=0 # 设置容器内部的用户 ID 为 root 用户

  • GID=0 # 设置容器内部的组 ID 为 root 组

  • GIDLIST=0 # 可选:设置其他需要的组 ID 列表(此处为 root 组)

  • PUID=0 # 设置容器内的用户 ID 为 root 用户

  • PGID=0 # 设置容器内的组 ID 为 root 组
    ports:

  • "8096:8096" # 默认 Emby 端口
    volumes:

  • /vol1/1000/视频:/视频 # 绑定你的媒体文件目录

  • ./config:/config # Emby 配置目录
    devices:

  • "/dev/dri:/dev/dri" # 显式映射 GPU 设备
    restart: unless-stopped # 容器失败自动重启