两个脚本,各管一件事:
install.sh— NAS 上一键安装(已有 linuxserver/emby 容器,DOCKER_MODS 拉不动时用)build.sh— 只构建 amd64 / arm64 二进制
交互式,会问 GitHub 代理、Docker Hub 代理、认证服务地址,自动探测容器、架构、配置目录和 compose 文件。
curl -fsSL https://raw.githubusercontent.com/SAGIRIxr/embyc/main/install.sh -o install.sh
bash install.shGitHub 不通就套代理下载脚本本身:
curl -fsSL https://ghproxy.net/https://raw.githubusercontent.com/SAGIRIxr/embyc/main/install.sh -o install.sh
bash install.sh出问题时先收集现场信息(只读,不改任何东西),把输出整段贴出来:
bash install.sh --doctor卸载还原:
bash install.sh --uninstall- 自动找 emby 容器,读出架构、
/config宿主机路径、compose 文件位置 - 探测 GitHub / Docker Hub / mcr.microsoft.com 连通性,据此给出代理建议
- 认证服务:填已有地址,或让脚本在本机起一个(Caddy 容器,提供破解需要的 5 个接口)。 填的地址访问不通时会再问一次——是继续用、改成本机部署、还是重填(NAS 上因为回环 NAT 访问不到自己的域名是常事,不代表地址是坏的)
- 取二进制:先试着从 mod 镜像里抠(走你选的 Docker Hub 代理),失败自动降级为本地编译(走 mcr.microsoft.com,跟 Docker Hub 是两条线)
- 装到
<config>/emby-crack-<arch>,并生成custom-cont-init.d/99-emby-crack.sh让每次启动自动打补丁 - 询问后改 compose(备份
.bak,加挂载和EMBY_CRACK_URL,注释掉失效的DOCKER_MODS)。 不会往 compose 里加DOTNET_SYSTEM_GLOBALIZATION_INVARIANT——那是容器级变量,Emby 自己也是 .NET 程序,会被一起拖进 invariant 模式导致zh-CN之类的 culture 非法而崩溃; 破解程序需要它时由启动脚本在自己进程里 export - 补丁没生效的话立即在运行中的容器里打一次,最后验证 Emby 的文件确实指向了你的认证服务
bash install.sh -u https://embycrack.example.com # 直接指定认证服务地址
bash install.sh --hub-proxy docker.1ms.run # 指定 Docker Hub 代理
bash install.sh --gh-proxy https://ghproxy.net/ # 指定 GitHub 代理
bash install.sh --source build # 强制本地编译
bash install.sh -c emby # 指定容器名
bash install.sh --help装完去 Emby 后台 → 设置 → Emby Premiere,随便填个 key 提交。
宿主机不需要装 .NET SDK,只要有 Docker 和 git。产物在 dist/。
curl -fsSL https://raw.githubusercontent.com/SAGIRIxr/embyc/main/build.sh | bash带参数用 bash -s --:
curl -fsSL https://raw.githubusercontent.com/SAGIRIxr/embyc/main/build.sh | bash -s -- -a arm64 -o .irm https://raw.githubusercontent.com/SAGIRIxr/embyc/main/build.ps1 -OutFile build.ps1; powershell -ExecutionPolicy Bypass -File .\build.ps1| 作用 | Linux / macOS | Windows |
|---|---|---|
| 只构建 arm64 | ./build.sh -a arm64 |
.\build.ps1 -Arch arm64 |
| 产物放当前目录 | ./build.sh -o . |
.\build.ps1 -Output . |
| 用本地已有源码 | ./build.sh -s <目录> |
.\build.ps1 -Src <目录> |
| 换仓库 / 分支 | ./build.sh -r <url> -b <branch> |
.\build.ps1 -Repo <url> -Branch <branch> |
| 跳过 docker pull | ./build.sh --no-pull |
.\build.ps1 -NoPull |
| 只打印命令不执行 | ./build.sh -n |
.\build.ps1 -DryRun |
| 全部选项 | ./build.sh -h |
Get-Help .\build.ps1 -Full |
源码来自 guowanghushifu/docker-mods (emby-crack), 本仓库只提供脚本,不包含也不分发任何二进制。